Skip to content

Instantly share code, notes, and snippets.

View kelsin's full-sized avatar

Christopher Giroir kelsin

View GitHub Profile
@kelsin
kelsin / home.sh
Last active August 29, 2015 14:01
Installing a new server with Chef
# Setup my home directory git
# Make sure you're ssh'd to the server with agent forwarding
cd
git init .
git remote add origin git@github.com:Kelsin/configs.git
git fetch origin
rm .bashrc
rm .bash_logout
git checkout master
@kelsin
kelsin / app.js
Last active August 29, 2015 14:01
Sample express app
var express = require('express');
var app = express();
// Load routes
require('./src/routes')(app);
@kelsin
kelsin / weechat-notifications.sh
Last active August 29, 2015 14:00
Functions to log into my remote server and read notifications from a socket
function irc-notification {
TYPE=$1
MSG=$2
terminal-notifier \
-title IRC \
-subtitle "$TYPE" \
-message "$MSG" \
-appIcon ~/path/to/icon.png \
-contentImage ~/path/to/icon.png \
@kelsin
kelsin / weechat
Last active May 6, 2018 18:01
Weechat Settings
# Nick and auth settings for freenode
/set irc.server_default.nicks "kelsin,kelsin1,kelsin2,kelsin3,kelsin4"
/set irc.server_default.sasl_mechanism dh-blowfish
/set irc.server_default.username "kelsin"
/set irc.server.freenode.sasl_username "kelsin"
/set irc.server.freenode.ssl on
/set irc.server.freenode.ssl_dhkey_size 1024
/set irc.server.freenode.addresses "chat.freenode.net/7000"
/set irc.server.freenode.autoconnect on
/set irc.server.freenode.autojoin "#antelopes,#legitco,#emacs,#vim"
HUBOT_IRC_NICK: legitbot
HUBOT_IRC_ROOMS: #legitco
HUBOT_IRC_SERVER: irc.freenode.net
@kelsin
kelsin / examples.sh
Last active August 29, 2015 14:00
Examples of using god as root with rbenv
# When using normal god commands with sudo -i is needed to load root's .bash_profile
# Start up god
sudo -i /etc/init.d/god start
# Shutdown god
sudo -i /etc/init.d/god stop
# See Status
sudo -i god status
@kelsin
kelsin / .bash_profile
Last active August 29, 2015 14:00
God Init Script for my Ubuntu VPS using rbenv
# /root/.bash_profile
export PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"
@kelsin
kelsin / god-install.sh
Last active August 29, 2015 14:00
Steps to install god as root with rbenv on my personal VPS
# Open a new root shell
sudo -i
# Install rbenv and ruby-build
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"' >> ~/.bash_profile
# Reloaded my shell
exit
@kelsin
kelsin / arch-packages.sh
Last active August 29, 2015 13:57
Arch packages that I installed onto my new system
# Packages that I've installed while setting up my new system
# During install
base
base-devel
grub
# System config
openssh
wget
@kelsin
kelsin / .xprofile.sh
Created March 10, 2014 07:25
My ~/.xprofile
# VirtualBox Guest?
if [ -x /usr/bin/VBoxClient-all ]; then
/usr/bin/VBoxClient-all
fi
# Multi Monitors
xrandr --output VBOX0 --auto --output VBOX1 --auto --right-of VBOX0
# ENV Variables
export PATH="$HOME/.cabal/bin:$HOME/bin:$PATH"