Skip to content

Instantly share code, notes, and snippets.

@nullfieldio
nullfieldio / gitgraph-js-playground.markdown
Last active December 9, 2019 18:48
@gitgraph/js playground
@nullfieldio
nullfieldio / install-tmux
Last active November 16, 2015 22:40 — forked from rothgar/install-tmux
Install tmux 2.0 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL http://sourceforge.net/projects/levent/files/libevent-2.0.22-stable.tar.gz
tar -xvzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
@nullfieldio
nullfieldio / zsh-install
Last active September 3, 2015 21:03
Install zsh to /usr/local/bin on centos/rhel 6
First, get and extract the files:
$ wget http://iweb.dl.sourceforge.net/project/zsh/zsh/5.1/zsh-5.1.tar.gz
$ tar xzf zsh-5.1.tar.gz
$ cd zsh-5.1
#Configure, make and install:
$ ./configure
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
@nullfieldio
nullfieldio / post_to_slack.sh
Created March 5, 2015 19:10
slack bash webhook
#!/bin/bash -e
URL= #https://hooks.slack.com/services/<YOUR ID> from webhooks on https://myteam.slack.com/services
CHANNEL="#general" # name of channel
MESSAGE="Hello World" # message
NICK="troll" # bot name
# post message
curl -X POST \
--data "payload={\"channel\": \"${CHANNEL}\", \"username\": \"${NICK}\", \"text\": \"${MESSAGE}\", \"icon_emoji\": \":troll:\"}" ${URL}