This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function (id, name, context, definition) { | |
// -------------------------------------------------------------------------- | |
// Dependencies | |
// | |
// This is an attempt to make this library compatible with multiple module | |
// formats. Other UMD implementations do not take into account dependencies: | |
// Example: https://github.com/ForbesLindesay/umd/blob/master/template.js | |
// | |
// **NOTE: Named AMD modules are more suitable for libraries as it provides |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!DDAsyncLoad) { | |
function DDAsyncLoad(cb) { | |
if (window.attachEvent) { | |
window.attachEvent('onload', cb); | |
} else { | |
window.addEventListener('load', cb, false); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(n,e,a,t,o,r,s,c){var c=c||[];n.onerror=function(n,e,a){c.push([n,e,a])};var i=!1; | |
r=e.createElement(a),s=e.getElementsByTagName(a)[0],r.async=1,r.src=t,r.crossorigin="anonymous", | |
r.onreadystatechange=r.onload=function(){if(!i){Raven.config(o).install();for(var n=0;n<c.length;n++)Raven.captureMessage("Message: "+c[n][0]+" - URL: "+c[n][1]+" - Line: "+c[n][2])}i=!0} | |
,s.parentNode.insertBefore(r,s) | |
}(window,document,"script","https://cdn.ravenjs.com/3.16.0/raven.min.js","https://[email protected]/xx"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $(brew --prefix) | |
git reset --hard HEAD | |
brew update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[APC] | |
extension=apc.so | |
apc.enabled=1 | |
apc.shm_segments=1 | |
;32M per WordPress install | |
apc.shm_size=128M | |
;Relative to the number of cached files (you may need to watch your stats for a day or two to find out a good number) | |
apc.num_files_hint=7000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifconfig en0 down | |
ifconfig en1 down | |
route -n flush | |
ifconfig en0 up | |
ifconfig en1 up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = (object)array( | |
"html" => "<foo bar=\"baz\"/> &", | |
"arabic" => "العربية al-ʿarabiyyah, IPA: [æl ʕɑrɑˈbijjɐ], or عربي ʿarabī", | |
"hebrew" => "עִבְרִית, Ivrit", | |
"chinese" => "汉语/漢語 Hanyu; 华语/華語 Huáyǔ; 中文 Zhōngwén", | |
"korean" => "한국어/조선말", | |
"japanese" => "日本語 Nihongo", | |
"umlauts" => "äüöãáàß", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo ip(); | |
function ip() | |
{ | |
if ($ip = getenv('X_FORWARDED_FOR')) { | |
return $ip; | |
} elseif ($ip = getenv('CLIENT_IP')) { | |
return $ip; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Php53Yaf < AbstractPhpExtension | |
homepage 'http://pecl.php.net/package/yaf' | |
url 'http://pecl.php.net/get/yaf-2.2.2.tgz' | |
sha1 '826f85b7b641a7418110f73f823749509c58b1b7' | |
head 'https://svn.php.net/repository/pecl/yaf/trunk/', :using => :svn | |
depends_on 'autoconf' => :build | |
depends_on 'php53' if build.include?('with-homebrew-php') && !Formula.factory('php53').installed? | |
depends_on 'pcre' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async.parallel({ | |
tasks: function(fn) { | |
mongo.model('Task').find(function(err, data) { | |
fn(err, data) | |
}); | |
}, | |
projects: function(fn) { | |
mongo.model('Project').find(function(err, data) { | |
fn(err, data) | |
}); |
NewerOlder