Skip to content

Instantly share code, notes, and snippets.

@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 / 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
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 {
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
# compare 2 files, each line is trim, empty lines are removed, lines are sorted
diff <(cat file1.txt | awk '{gsub(/^ +| +$/,"")}1' | grep -v '^\s*$' | sort) \
<(cat file2.txt | awk '{gsub(/^ +| +$/,"")}1' | grep -v '^\s*$' | sort)
@jney
jney / wait_time.sh
Created November 25, 2010 11:21
wait_tries.sh
#!/bin/bash
LOCK_FILE="pgr.lock"
MAX_TRIES=5
if [[ -f $LOCK_FILE ]]; then
TRIES=$((`cat $LOCK_FILE` + 1))
echo $TRIES > $LOCK_FILE
if [[ $TRIES < $MAX_TRIES ]]; then
/*
Add a bookmark to this
javascript:(function(b){for(var c=0,a=b.length;c<a;c++){var d=b[c];if(d.rel==="stylesheet"||d.type==="text/css"){var e=d.href.split("?",2);d.href=e[0]+"?"+((e.length===2)?e[1]+"&":"")+(new Date().getTime())}}})(document.getElementsByTagName("link"));
*/
;(function (links) {
for (var i = 0, len = links.length; i < len; i++) {
var link = links[i];
if (link.rel === 'stylesheet' || link.type === 'text/css') {
// naissances|anniversaires|autres-evenements|conferences|deces|mariages
var
pathname = location.pathname,
siteId = "Carnet_du_jour",
x2 = 14;
// url = http://carnetdujour.lefigaro.fr/
if (pathname == "/") {
atiTag({
chapters: [siteId,"accueil_carnet_du_jour","accueil_carnet_du_jour","accueil_carnet_du_jour"],
/***
* How to use it in your html page :
* copy the code and paste it in your page and update param passed to
* Figaro.redirectUrl to desired page. So, Figaro.redirectUrl will
* return new calculated URL.
*
* - Calculated link to pass through
* <a href="#" onclick="window.location.replace(Figaro.redirect)">
* Pass this ad
* </a>
webkit2png -o "$(date +"%Y%m%d%H%M")" -F "http://www.lefigaro.fr/"