This file contains 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
<!-- Embed --> | |
<div id="my-embed-content"></div> | |
<script>(function(d, s, id) { | |
var my_account = 123; | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//the.location.of/my/embed.js#acc="+my_account+"&w=900&h=700"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'my-embed'));</script> |
This file contains 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 parseQuery ( query ) { | |
var Params = new Object (); | |
if ( ! query ) return Params; | |
var Pairs = query.split(/[;&]/); | |
for ( var i = 0; i < Pairs.length; i++ ) { | |
var KeyVal = Pairs[i].split('='); | |
if ( ! KeyVal || KeyVal.length != 2 ) continue; | |
var key = unescape( KeyVal[0] ); | |
var val = unescape( KeyVal[1] ); | |
val = val.replace(/\+/g, ' '); |
This file contains 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
#!/bin/bash | |
echo Provisioning Ruby on Rails... | |
echo ================================= | |
echo - Installing dependencies | |
sudo apt-get update -y -qq > /dev/null | |
sudo apt-get install curl -y -qq > /dev/null | |
echo - Installing mysql server | |
export DEBIAN_FRONTEND=noninteractive |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" | |
config.vm.provision "shell", path: "https://gist.githubusercontent.com/arielcr/8845938/raw/b95e82166b24728df0d91b31dab9a65eed6cd01f/ror-provisioning.sh" |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
$.getJSON('select.php', {customerId: $(this).val()}, function(data){ | |
var vehicle = $('#vehicle'); | |
for (var x = 0; x < data.length; x++) { | |
vehicle.append(new Option(data[x].reg, data[x].id)); | |
} | |
}); |
This file contains 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
Route::filter('allowOrigin', function($route, $request, $response) | |
{ | |
$response->header('access-control-allow-origin','*'); | |
}); |
This file contains 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
rsync -av /local/path/ [email protected]:/remote/path/ |
OlderNewer