Skip to content

Instantly share code, notes, and snippets.

View florianb's full-sized avatar
⚗️
Brewing some Elixir

Florian Neumann florianb

⚗️
Brewing some Elixir
View GitHub Profile
@florianb
florianb / kubedump.sh
Created November 3, 2018 13:33 — forked from negz/kubedump.sh
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@florianb
florianb / irssi.basics
Created September 25, 2017 07:11 — forked from jparrill/irssi.basics
IRSSI Cheatsheet
## Basics
/connect irc.nullirc.net
/server add -network <name> <url> <port>
/join <channel>
/alias <name> /action ...
## xmpp
yum install irssi-xmpp
irssi
/load xmpp
@florianb
florianb / writing-eslint-rule.md
Created August 3, 2017 10:39 — forked from sindresorhus/writing-eslint-rule.md
Gettings started writing a ESLint rule

Gettings started writing a ESLint rule

First, take a look at the ESLint rule documentation. Just skim it for now. It's very long and boring. You can come back to it later.

ESLint rules works on the AST (Abstract Syntax Tree) representation of the code. In short, this is a tree structure that describes the code in a very verbose form. ESLint walks this tree and rules can subscribe to be notified when it hits a specific node type, like a Literal type, which could be the "hello" part of const welcome = "hello";.

Go ahead and play around with some code in AST Explorer (Make sure the parser is espree). It's a great tool!

Here are some good articles on the subject (ignore the scaffolding parts):

@florianb
florianb / writing-eslint-rule.md
Created August 3, 2017 10:39 — forked from sindresorhus/writing-eslint-rule.md
Gettings started writing a ESLint rule

Gettings started writing a ESLint rule

First, take a look at the ESLint rule documentation. Just skim it for now. It's very long and boring. You can come back to it later.

ESLint rules works on the AST (Abstract Syntax Tree) representation of the code. In short, this is a tree structure that describes the code in a very verbose form. ESLint walks this tree and rules can subscribe to be notified when it hits a specific node type, like a Literal type, which could be the "hello" part of const welcome = "hello";.

Go ahead and play around with some code in AST Explorer (Make sure the parser is espree). It's a great tool!

Here are some good articles on the subject (ignore the scaffolding parts):

@florianb
florianb / tomcat.sh
Last active August 29, 2015 14:19 — forked from collinpeters/tomcat.sh
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/
# 2012 - Collin Peters - Added debug option
#
### BEGIN INIT INFO
sa.setAppenderFactory(new AppenderFactory<ILoggingEvent>() {
@Override
public Appender<ILoggingEvent> buildAppender(Context context, String discriminatingValue) throws JoranException {
RollingFileAppender<ILoggingEvent> appender = new RollingFileAppender<>();
appender.setName("ROLLINGFILE-" + discriminatingValue);
appender.setContext(context);
appender.setFile(discriminatingValue + ".log");
TimeBasedRollingPolicy<ILoggingEvent> policy = new TimeBasedRollingPolicy<>();
#!/usr/bin/env bash
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`