Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
(function($) { | |
/** | |
* We have to get a collection of id's because the HTML5 player moves the DOM | |
* around and returns different elements when caching the selectors. | |
*/ | |
var elements = $('.video-player > div, .video-player object'), | |
playerIds = []; | |
elements.each(function(i, player) { | |
playerIds.push(player.id); |
<?php | |
/** | |
* This snippet adds extra classes to Drupal | |
* menu leafs (li tags) and menu itself (ul tags). | |
*/ | |
/** | |
* Since the standart preprocess function for menu tree, which is | |
* template_preprocess_menu_tree, located in includes/menu.inc, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
var array = []; | |
function closest(array,num){ | |
var i=0; | |
var minDiff=1000; | |
var ans; | |
for(i in array){ | |
var m=Math.abs(num-array[i]); | |
if(m<minDiff){ | |
minDiff=m; |
.block | |
-(1..6).each do |i| | |
.element #{i} |
{ | |
"variables": { | |
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}", | |
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}" | |
}, | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"ssh_pty": true, | |
"access_key": "{{user `aws_access_key`}}", |
watchdog('module_name', 'Your Object: !object', array('!object' => '<pre>' . check_plain(print_r($object, TRUE)) . '</pre>'), WATCHDOG_ERROR); |
input.form-submit.button-small { | |
padding: 4px 8px; | |
font-weight: bold; | |
} | |
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber { | |
position: absolute; | |
left: 19px; | |
margin-top: 7px; | |
} |