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
<!doctype html> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery Sortable</title> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css"> | |
</head> |
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 | |
Media::type('csv', 'text/plain', array( | |
'encode' => function($data) { | |
ob_start(); | |
$out = fopen('php://output', 'w'); | |
foreach ($data as $record) { | |
fputcsv($out, $record); | |
} | |
fclose($out); |
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 | |
use lithium\action\Dispatcher; | |
use lithium\storage\Session; | |
use lithium\security\validation\RequestToken; | |
use lithium\action\Response; | |
Dispatcher::applyFilter('run', function($self, $params, $chain) { | |
$request = $params['request']; |
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
$location = "Mountain View" | |
$country = "US" | |
$state = "CA" | |
$organization = "Google" | |
$unit = "Search" | |
$commonname = "www.example.com" | |
$keyname = "www_example_com" | |
$subject = "/C=${country}/ST=${state}/L=${location}/O=${organization}/OU=${unit}/CN=${commonname}" | |
$createcertificate = "openssl req -new -newkey rsa:2048 -x509 -days 365 -nodes -out ${keyname}.crt -keyout ${keyname}.key -subj \"${subject}\"" |
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
import os, sys | |
import datetime | |
import base64 | |
import cloudservers | |
import cloudlb | |
import urllib2 | |
#import paramiko | |
from time import sleep |
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
$('a.reveal').click(function(event) { | |
event.preventDefault(); | |
var $div = $('<div>').addClass('reveal-modal').appendTo('body'), | |
$this = $(this); | |
$.get($this.attr('href'), function(data) { | |
return $div.empty().html(data).append('<a class="close-reveal-modal">×</a>').reveal(); | |
}); | |
}); |
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
<select name="country" style="display: none; "> | |
<option value="AD">Andorra</option> | |
<option value="AE">United Arab Emirates</option> | |
<option value="AF">Afghanistan</option> | |
<option value="AG">Antigua and Barbuda</option> | |
<option value="AI">Anguilla</option> | |
<option value="AL">Albania</option> | |
<option value="AM">Armenia</option> | |
<option value="AO">Angola</option> | |
<option value="AQ">Antarctica</option> |
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
#!/bin/sh | |
############################################################## | |
# | |
# Author: Ruslan Khissamov, email: [email protected] | |
# Taken from http://apptob.org/, use that url to customize to your needs | |
############################################################## | |
# Add MongoDB Package | |
echo 'Add MongoDB Package' | |
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list |
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
// Cross-browser object.watch and object.unwatch | |
// Requires Mootools 1.4 or greater | |
// object.watch | |
(function(){ | |
if (!Object.prototype.watch) { | |
Object.implement('watch',function(prop,handler){ | |
var oldval = this[prop], newval = oldval, | |
getter = function () { | |
return newval; |
NewerOlder