jq is useful to slice, filter, map and transform structured json data.
brew install jq
## Global install of the app generator | |
npm install -g create-react-app | |
## Setup the app (first-time only) | |
create-react-app my-app | |
cd my-app | |
git init | |
# Create the Heroku app; requires free account at https://www.heroku.com/ | |
heroku create -b https://github.com/heroku/heroku-buildpack-static.git |
#.config/compton.conf | |
# Source: http://www.iwillfolo.com/how-to-use-compton-compositing-manager-to-enhance-xfce-lxde-other-des/ | |
# GLX backend | |
###################################### | |
backend = "glx"; | |
vsync = "opengl-swc"; | |
glx-no-stencil = true; | |
glx-copy-from-front = false; | |
#glx-use-copysubbuffermesa = true; | |
glx-no-rebind-pixmap = true; |
-- conway's game of 💩 | |
-- shittily written by benley | |
module Main where | |
import Control.Concurrent | |
import Data.Array.Unboxed | |
import System.Environment | |
data Cell = Live | Dead deriving Eq |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
#!/home/drspock/scripts/FBInvite/bin/python | |
import argparse | |
import requests | |
import pyquery | |
def login(session, email, password): | |
''' | |
Attempt to login to Facebook. Returns user ID, xs token and |
var months = [ | |
'January', 'February', 'March', 'April', 'May', | |
'June', 'July', 'August', 'September', | |
'October', 'November', 'December' | |
]; | |
function monthNumToName(monthnum) { | |
return months[monthnum - 1] || ''; | |
} | |
function monthNameToNum(monthname) { |
rm -f out | |
mkfifo out | |
trap "rm -f out" EXIT | |
while true | |
do | |
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out". | |
export REQUEST= | |
while read line | |
do | |
line=$(echo "$line" | tr -d '[\r\n]') |
#!/bin/sh | |
# This is a skeleton of a bash daemon. To use for yourself, just set the | |
# daemonName variable and then enter in the commands to run in the doCommands | |
# function. Modify the variables just below to fit your preference. | |
daemonName="DAEMON-NAME" | |
pidDir="." | |
pidFile="$pidDir/$daemonName.pid" |