Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# initd-example Node init.d
#
# chkconfig: 345 80 20
# description: Node init.d example
# processname: node
# pidfile: /var/run/initd-example.pid
# logfile: /var/log/initd-example.log
#
sudo useradd -m -U -s /bin/bash USERNAME
sudo mkdir /home/USERNAME/.ssh
sudo chmod 700 /home/USERNAME/.ssh
sudo touch /home/USERNAME/.ssh/authorized_keys
sudo chown -R USERNAME:USERNAME /home/USERNAME/.ssh
sudo chmod 600 /home/USERNAME/.ssh/authorized_keys
if sudo
sudo usermod -a -G sudo USERNAME

Keybase proof

I hereby claim:

  • I am twalling on github.
  • I am twalling (https://keybase.io/twalling) on keybase.
  • I have a public key whose fingerprint is 5808 8B20 4000 757C 9F3B 8CF7 41DF 80B4 5C32 EBF3

To claim this, I am signing this object:

@twalling
twalling / heroku_syslog_proxy.rb
Created February 26, 2012 04:06
Syslog proxy for Heroku log messages to make them work with Graylog2
# example message:
# 197 <158>1 2011-11-28T19:00:34+00:00 d.b948a827-37d6-431e-9323-03e8ec503a35 heroku router - - GET graylog2.org/images/screenshots/04_t.png dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=29494
require 'socket'
require 'gelf'
DEBUG = true
LISTEN_PORT = 5514
LISTEN_ADDRESS = "127.0.0.1"
@twalling
twalling / bootstrap.sh
Created September 18, 2012 12:38
Bootstrap bash script which sets environment variables before running a Node.js application
#!/bin/bash
export INSTAGRAM_CLIENTID=INSERT_YOURS_HERE
export INSTAGRAM_CLIENTSECRET=INSERT_YOURS_HERE
export TWITTER_CONSUMERKEY=INSERT_YOURS_HERE
export TWITTER_CONSUMERSECRET=INSERT_YOURS_HERE
export TWITTER_ACCESSTOKENKEY=INSERT_YOURS_HERE
export TWITTER_ACCESSTOKENSECRET=INSERT_YOURS_HERE
node src/workers.js
{
"IAB1": "Arts & Entertainment",
"IAB1-1": "Books & Literature",
"IAB1-2": "Celebrity Fan/Gossip",
"IAB1-3": "Fine Art",
"IAB1-4": "Humor",
"IAB1-5": "Movies",
"IAB1-6": "Music",
"IAB1-7": "Television",
"IAB2": "Automotive",
#!/bin/bash
set -o allexport
source .env
set +o allexport
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[0;35m\]\h\[\033[0;33m\] \W\[\033[31m\]\$(parse_git_branch)\[\033[00m\]: "
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=ExFxCxDxBxegedabagacad
@twalling
twalling / cgminer.conf
Last active August 23, 2017 06:43
cgminer litecoin setup
{
"pools" : [
{
"url" : "URL",
"user" : "USER.WORKER",
"pass" : "PASS"
}
],
"intensity": "13",

Grilled Chicken Thighs

Ingredients

  • 2 1/2 pounds boneless chicken thighs
  • 1 1/2 tbsp olive oil
  • 1/2 tsp garlic powder
  • 1/2 tsp onion powder
  • 1 tbsp paprika
  • 3/4 teaspoon sea salt