Skip to content

Instantly share code, notes, and snippets.

View DavyLandman's full-sized avatar

Davy Landman DavyLandman

View GitHub Profile
@Dianoga
Dianoga / node.service
Created December 13, 2012 15:51
systemd .service file for node.js app. Requires forever.
[Unit]
Description=Start Herir Node.js Service
Requires=network.target
After=network.target
[Service]
Type=forking
WorkingDirectory=/srv/hereir/node
ExecStart=/usr/bin/forever start --pidFile /var/run/hereir.pid HereIR.js
ExecStop=/usr/bin/forever stop HereIR.js
@jurgenvinju
jurgenvinju / TestRecovery.rsc
Created October 4, 2012 14:19
A test file to experiment with the robust parsing feature of Rascal
module TestRecovery
extend lang::pico::\syntax::Main;
import util::IDE;
import ParseTree;
import IO;
public map[Production robust, CharClass lookaheads] robust
= (p:[range(10,10),range(59,59)] | /p:prod(label(_,sort("Statement")),_,_) := #Statement)
+ (p:[range(10,10),range(59,59),range(44,44)] | /p:prod(label(_,sort("IdType")),_,_) := #IdType);
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?