Skip to content

Instantly share code, notes, and snippets.

@dcrec1
dcrec1 / read.js
Last active May 9, 2018 13:35 — forked from sjcotto/read.js
function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
@dcrec1
dcrec1 / statsd.init.sh
Last active December 17, 2015 04:28 — forked from erickr/statsd.init.sh
#!/bin/bash
#
# StatsD
#
# chkconfig: 3 50 50
# description: StatsD init.d
. /lib/lsb/init-functions
prog=statsd
STATSDDIR=/var/local/apps/statsd
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:03
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:02
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:02
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@dcrec1
dcrec1 / Gemfile
Created October 19, 2011 21:12 — forked from chriseppstein/readme.md
How to integrate Compass with Rails 3.1 asset pipeline
group :assets do
gem 'sass-rails', '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier'
gem 'compass', '~> 0.12.alpha'
# include other compass plugins here. E.g.:
gem 'compass-susy-plugin', :require => 'susy'
end
@dcrec1
dcrec1 / bash_profile.sh
Created April 23, 2009 15:47 — forked from henrik/.bashrc
show git branch
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='`rvm-prompt i v g` \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '