Skip to content

Instantly share code, notes, and snippets.

View rozap's full-sized avatar

Chris Duranti rozap

View GitHub Profile
@rozap
rozap / less-monitor
Created June 28, 2013 02:49
monitor a directory of less files and compile the output to a css file when anything changes in the directory. requires inotify-tools, here https://github.com/rvoicilas/inotify-tools/wiki
#!/bin/sh
while inotifywait -e modify .; do
lessc all.less > ../css/style.css
done
@rozap
rozap / gist:7635563
Created November 25, 2013 02:56
record screen with ffmpeg
ffmpeg -y -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -vpre lossless_ultrafast -crf 22 -acodec libmp3lame -ar 44100 -ab 126k -threads 3 ~/Desktop/screencast.mkv
- name: Setup python and repos
hosts: testing
sudo_user: cms
user: ansible
vars_files:
- vars/vars.yml
roles:
- {role: appserver, sudo: no, ansible_python_interpreter: '/var/sites/lbsappserver/bin/pyvenv'}
- {role: queue, sudo: yes, ansible_python_interpreter: '/var/sites/lbsappserver/bin/pyvenv'}
@rozap
rozap / gist:8571817
Created January 23, 2014 02:33
hehehe
import sys
import telnetlib
import re
HOST = "localhost"
tn = telnetlib.Telnet(HOST, 8000)
def _(msg, expected):
tn.write(msg + '\n')
@rozap
rozap / why
Created February 4, 2014 06:01
why
var gulp = require('gulp');
var browserify = require('gulp-browserify');
// Basic usage
gulp.task('scripts', function() {
// Single entry point to browserify
gulp.src('lib/public/js/src/app.js')
.pipe(browserify({
insertGlobals: false,
debug: true
var gulp = require('gulp');
var browserify = require('gulp-browserify');
// Basic usage
gulp.task('scripts', function() {
// Single entry point to browserify
gulp.src('lib/public/js/src/app.js')
.pipe(browserify({
insertGlobals: false,
debug: true
function fuck() {
if killall -9 "$2"; then
echo ; echo " (╯°□°)╯︵$(echo "$2"|toilet -f term -F rotate)"; echo
fi
}
@rozap
rozap / keybase.md
Created March 7, 2014 18:33
keybase.md

Keybase proof

I hereby claim:

  • I am rozap on github.
  • I am rozap (https://keybase.io/rozap) on keybase.
  • I have a public key whose fingerprint is 2E8B 67A6 0637 E08F B26B 53E3 A454 12A1 1D5E 2FCB

To claim this, I am signing this object:

//for that native app feel...
window.onerror = function( ){
window.close()
}
@rozap
rozap / gist:9608941
Created March 17, 2014 21:38
test script for cs416 assignment
import subprocess
import os
import re
import unittest
from unittest import TestSuite
from collections import defaultdict
class TestPrime(unittest.TestCase):
def __init__(self, num, pnum):