Skip to content

Instantly share code, notes, and snippets.

mono mono0x

Block or report user

Report or block mono0x

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mono0x /
Last active Oct 7, 2015
# usage extractaudio input output
avconv -i $1 -vn -c:a copy $2
mono0x / gist:3340240
Created Aug 13, 2012
Google Search URI
View gist:3340240
View horoscopes.rb
# -*- coding: utf-8 -*-
require 'date'
module Horoscopes
View paperfortune.rb
# -*- coding: utf-8 -*-
require 'date'
require 'digest/sha1'
module PaperFortune
def self.paper_fortune(w, *a)
n = w.inject(&:+)
r =
w.each_index.find {|i| r < w[0..i].inject(&:+) }
View zepto-extras.js
(function($) {
// Used by dateinput
$.expr = {':': {}};
// Used by bootstrap
$.support = {};
// Used by dateinput
$.fn.clone = function(){
var ret = $();
View parallel_process.rb
require 'parallel'
module Jekyll
class Site
def render
payload = site_payload {|post|
post.render(self.layouts, payload)
mono0x /
Created Feb 14, 2013
wget --keep-session-cookies --save-cookies=cookies.txt --post-data 'id=...&password=...' url
wget --load-cookies=cookies.txt -r url
View Makefile
TEX = master.tex
DVI = $(TEX:.tex=.dvi)
PDF = $(TEX:.tex=.pdf)
AUX = $(TEX:.tex=.aux)
TMP = $(TEX:.tex=.bbl) $(TEX:.tex=.blg) $(TEX:.tex=.log)
BIB = $(wildcard *.bib)
PRN = $(wildcard *.prn)
PNG = $(wildcard *.png)
JPG = $(wildcard *.jpg)
EPS = $(PRN:.prn=.eps) $(PNG:.png=.eps) $(JPG:.jpg=.eps)
View open_file_with_vim.reg
Windows Registry Editor Version 5.00
@="D:\\Documents\\tools\\vim\\gvim.exe --remote-silent \"%1\""
mono0x / cpuaffinity.rb
Created Oct 22, 2013
Set CPU Affinity
View cpuaffinity.rb
class CPUAffinity
def self.set_affinity(mask, pid =
system "taskset -p 0x#{mask.to_s(16)} #{pid}"
You can’t perform that action at this time.