Skip to content

Instantly share code, notes, and snippets.

namespace :pathogen do
task :update do
`curl -# -o ./autoload/pathogen.vim 'https://github.com/tpope/vim-pathogen/raw/master/autoload/pathogen.vim'`
end
end
namespace :modules do
namespace :rm do
Dir.entries('bundle').reject{|d| d == '.' || d == '..' }.each do |directory|
task directory do
if (typeof $().highlightRegex === "function") {
!RegExp.escape && (RegExp.escape = function(text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
});
$('#rech').keypress(function () {
$('#NewsHome').highlightRegex();
var txt = $(this).val();
if (txt.length > 2) {
try {
@jney
jney / trace.log
Created February 14, 2011 21:15
sudo dtruss $(which nginx) 2>&1 | tee ./trace.log > /dev/null
SYSCALL(args) = return
getpid(0x7FFF5FBFEDE0, 0x7FFFFFE00050, 0x0) = 52989 0
open_nocancel("/dev/urandom\0", 0x0, 0x0) = 3 0
read_nocancel(0x3, "\b\217\buF\306\261T\022\375AF\246$9\001\216\320I\022\333\270\371P\325{\314\017{3{\333\274\317b\203\027\240{\215\366\333\244\356\v\225\305a\337S\224\2672+='`+\317\374m\adm+\006\3040\261\270=U\254\323\352\005\361;\005\347]\202\350 \255\373\260\252Z(k}pc\367\350\024\a\251^\363y\216\356\257\374~\210\0", 0x6C) = 108 0
close_nocancel(0x3) = 0 0
issetugid(0x100000000, 0x7FFF5FBFF0F8, 0x7FFF5FC40530) = 0 0
geteuid(0x100000000, 0x7FFF5FBFF0F8, 0x0) = 0 0
__sysctl(0x7FFF5FBFCCD0, 0x2, 0x7FFF5FBFCC90) = 0 0
__sysctl(0x7FFF5FBFCC90, 0x2, 0x7FFF5FBFCD2C) = 0 0
shared_region_check_np(0x7FFF5FBFCE98, 0x0, 0x7FFF5FC1DC86) = 0 0
@jney
jney / nginx.nm.out
Created February 14, 2011 21:19
nm $(which nginx) > nginx.nm.out
U _BIO_ctrl
U _BIO_free
U _BIO_new
U _BIO_new_file
U _BIO_read
U _BIO_s_mem
U _BN_bin2bn
U _CRYPTO_free
U _DH_free
U _DH_new
@jney
jney / lua.out
Created February 15, 2011 20:58
nm $(which lua) > lua.out
000000010002e15c s stub helpers
000000010001e230 t _Arith
000000010000e070 t _DumpFunction
000000010002e0d8 s _KEY_HOOK
000000010001c4c0 t _LoadFunction
000000010001c3e0 t _LoadString
00000001000361f0 D _NXArgc
00000001000361f8 D _NXArgv
U __DefaultRuneLocale
U ___error
@jney
jney / trace.log
Created February 15, 2011 21:06
sudo dtruss -a -f -l $(which nginx) 2>&1 | tee ./trace.log > /dev/null
PID/THRD RELATIVE ELAPSD CPU SYSCALL(args) = return
3110/0x181437: 229 511 0 getpid(0x7FFF5FBFEC80, 0x7FFFFFE00050, 0x0) = 3110 0
3110/0x181437: 299 76 67 open_nocancel("/dev/urandom\0", 0x0, 0x0) = 3 0
3110/0x181437: 332 40 31 read_nocancel(0x3, "\205\343\261&\327RQd\330v\276\032\016\313\362#\341\244\307\033\327dZ!.\332m>9\2054$G\335aRS\300\345\224fs\354\221\254\317\177f\304\002\273\037\355X\344V\234B\200\re\230Y\357\260\3217^\002\2332\203\377\255\206\342D\v\343\345c\212[bt\373X\264\027\202\373\207\317\311\230\321lX\360\304\357\021\370\214/\344AH\0", 0x6C) = 108 0
3110/0x181437: 340 13 6 close_nocancel(0x3) = 0 0
3110/0x181437: 383 6 0 issetugid(0x100000000, 0x7FFF5FBFEF98, 0x7FFF5FC40530) = 0 0
3110/0x181437: 385 5 0 geteuid(0x100000000, 0x7FFF5FBFEF98, 0x0) = 0 0
3110/0x181437: 469 21 15 __sysctl(0x7FFF5FBFCB70, 0x2, 0x7FFF5FBFCB30) = 0 0
3110/0x181437: 476
@jney
jney / gist:838547
Created February 22, 2011 11:37 — forked from ezmobius/gist:807334
#!/bin/bash
set -e
trap onexit 1 2 3 15 ERR
function onexit {
echo "## cleaning installation folder"
pushd /tmp
rm -rf libev-mirror
rm -rf zeromq-2.1.0
@jney
jney / translate-srt.py
Created March 28, 2011 20:37
translate a srt file with google translate
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys,json,urllib
from pysrt import SubRipFile, SubRipItem
url_string = 'http://ajax.googleapis.com/ajax/services/language/'
def detect(text):
query = dict(v='1.0', q=text)
@jney
jney / less-math.js
Created April 25, 2011 12:08
get every Math constants and functions in less.js
if( '__proto__' in {} ) {
tree.functions = Math.__proto__;
} else {
var mathFn = 'E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2 abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan'.split(' ');
for (var i = 0; i < mathFn.length; i++) {
tree.functions[mathFn[i]] = Math[mathFn[i]];
}
}
@jney
jney / LICENSE.txt
Created June 21, 2011 11:01 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE