Skip to content

Instantly share code, notes, and snippets.

View acidjazz's full-sized avatar
🎯
Focusing

kevin olson acidjazz

🎯
Focusing
View GitHub Profile
<?
$m = new Mongo(MONGO_HOST);
$db = $m->{MONGO_DB};
$col = $db->video;
$obj = ['this' => 'is a test', 'and this' => [1,2,3,4,5]];
$col->save($obj);
cwidth = 160
cheight = 90
cborder = 1
mheight = (cheight*3) + (cborder*2)
.montage
width 960px
height unit(mheight, px)
margin auto
#!/bin/bash
# turn on epel repo
sed -i '/^\[epel\]$/,/^\[/ s/^enabled=0/enabled=1/' /etc/yum.repos.d/epel.repo
yum -y update
# php5.5, httpd 2.4, nodejs and npm
yum -y install httpd24 php55 php55-devel git gcc nodejs npm
# jade
cathighlight:
re = new RegExp(search.string, 'gi')
$('.search .right .category').each (i, el) ->
console.log $(el).html()
ServerLimit 2048
MaxRequestWorkers 2048
ServerSignature Off
ServerTokens ProductOnly
TraceEnable Off
EnableMMAP on
EnableSendfile on
<?
private static function checkProcess() {
exec('pgrep -xlf "node srv/jade_web.js"', $output);
if (count($output) < 1) {
return false;
}
return true;
}
slide.callback(1, {
on: function() {
return this.addClass('active');
},
off: function() {
return this.removeClass('active');
}
});
slide.callback(2, {
slide =
c: {}
o: []
callbacks: {}
current: 0
prospect: 0
#!/bin/bash
function ajprompt() {
if [ $? = "0" ]; then cmd=1; else cmd=0; fi
local db="\[\033[1;34m\]"
local lb="\[\033[1;34m\]"
local dg="\[\033[0;32m\]"
local lg="\[\033[1;32m\]"
return transition = function(el, time) {
var css, key, s, value, _results;
console.log(el.length);
s = time / 1000;
css = {
'-webkit-transition-duration': "" + s + "s",
'-moz-transition-duration': "" + s,
'-o-transition-duration': "" + s,
'-ms-transition-duration': "" + s,
'transition-duration': "" + s,