Skip to content

Instantly share code, notes, and snippets.

rm -r /opt/torquebox/torquebox/jboss/standalone/data/messagingjournal/*.hq
rm -r /opt/torquebox/torquebox/jboss/standalone/data/messagingbindings/*.jms
rm -r /opt/torquebox/torquebox/jboss/standalone/data/messagingbindings/*.bindings
java -cp /opt/torquebox/torquebox/jboss/modules/org/hornetq/main/hornetq-core-2.2.21.Final.jar:/opt/torquebox/torquebox/jboss/modules/org/jboss/netty/main/netty-3.2.6.Final.jar org.hornetq.core.journal.impl.ImportJournal /opt/torquebox/torquebox/jboss/standalone/data/messagingbindings/ hornetq-bindings bindings 1048576 message_binding
java -cp /opt/torquebox/torquebox/jboss/modules/org/hornetq/main/hornetq-core-2.2.21.Final.jar:/opt/torquebox/torquebox/jboss/modules/org/jboss/netty/main/netty-3.2.6.Final.jar org.hornetq.core.journal.impl.ImportJournal /opt/torquebox/torquebox/jboss/standalone/data/messagingbindings/ hornetq-jms jms 1048576 message_jms
java -cp /opt/torquebox/torquebox/jboss/modules/org/hornetq/main/hornetq-core-2.2.21.Final.jar:/opt/torquebox/torquebox/jboss/mod
yum install openssl-devel
yum install gcc-c++
cd /usr/local/src
wget http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v0.10.5
./configure
make
make install
@SinisterLight
SinisterLight / gist:5655901
Last active December 17, 2015 18:49
Install rbenv | moving from rvm to rbenv
rvm implode
brew update
brew install rbenv
brew install ruby-build
rbenv init -
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
rbenv install 1.9.3-p429
rbenv rehash
(function quine() { console.log('(' + quine.toString() + ')()') })()
@SinisterLight
SinisterLight / JS Patterns
Created May 30, 2013 12:56
Standard JS helpers
function asyncForEach(array, iterator, then) {
function loop(i) {
if (i < array.length) {
iterator(array[i], function() {
loop(i + 1);
}
else {
then();
}
}
function success(position) {
}
function error() {
}
if (navigator.geolocation) navigator.geolocation.getCurrentPosition(success, error);
else error();
@SinisterLight
SinisterLight / Fedora UI
Created October 3, 2013 09:00
Changing Fedora font rendering to be Ubuntu like
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
su -c "yum install freetype-freeworld"
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "hinting" "slight"
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "antialiasing" "rgba"
echo "Xft.lcdfilter: lcddefault" > ~/.Xresources
#reboot
#xrdb -query
#Xft.antialias: 1
# Total Commits per author
git shortlog -sn
# Author total addition and substraction
git log --numstat --pretty="%H" --author="Sinister Light" | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
# Number of lines per author
git ls-files | xargs -n1 -d'\n' -i git blame {} | perl -n -e '/\s\((.*?)\s[0-9]{4}/ && print "$1\n"' | sort -f | uniq -c -w3 | sort -r
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import SocketServer
class S(BaseHTTPRequestHandler):
def _set_headers(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
def do_GET(self):
@SinisterLight
SinisterLight / Links
Last active August 29, 2015 14:00
Links