Skip to content

Instantly share code, notes, and snippets.

@jonforums
jonforums / download.rb
Created March 26, 2012 01:15
Ruby HTTP/HTTPS/FTP file downloader
#!/usr/bin/env ruby
# An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's
# HTTP implementation.
#
# Author: Jon Maken
# License: 3-clause BSD
# Revision: 2012-03-25 23:01:19 -0600
require 'net/http'
require 'net/https' if RUBY_VERSION < '1.9'
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
@biow0lf
biow0lf / gettext-0.17-lion.patch
Created March 11, 2011 21:46
patch for gettext compile under Mac OSX 10.7 (Lion) (doesn't tested well)
diff -ur gettext-0.17.orig/gettext-tools/gnulib-lib/stpncpy.c gettext-0.17/gettext-tools/gnulib-lib/stpncpy.c
--- gettext-0.17.orig/gettext-tools/gnulib-lib/stpncpy.c 2007-10-07 23:29:35.000000000 +0300
+++ gettext-0.17/gettext-tools/gnulib-lib/stpncpy.c 2011-03-11 23:34:40.000000000 +0200
@@ -24,7 +24,7 @@
#include <string.h>
#ifndef weak_alias
-# define __stpncpy stpncpy
+//# define __stpncpy stpncpy
#endif
<h1>Demo code for "Extreme JavaScript Performance" @ JSConf.eu</h1>
<script>
var benchmark = function(m,i){
var d1 = new Date, d2, r;
while(i--) r = m();
d2 = new Date;
console.log(d2.getTime()-d1.getTime());
// if(r) console.log(r);
}