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
import os, sys | |
import datetime | |
import base64 | |
import cloudservers | |
import cloudlb | |
import urllib2 | |
#import paramiko | |
from time import sleep |
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
$('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 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 lithium\action\Dispatcher; | |
//Allow admin continuation routes to be made. | |
Dispatcher::config( | |
array( | |
'rules' => array( | |
'admin' => array('action' => 'admin_{:action}') | |
) | |
) | |
); |
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
" Vim color file | |
" Maintainer: Mehdi Lahmam B. (mehlah) | |
" Inspired by Li3 color scheme - http://dev.lithify.me/lithium/wiki/about/visual-identity | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
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
<?php | |
/** | |
* This script is meant to be executed via crontab. | |
* It should help you easily set li3 commands as cron jobs. | |
* | |
* You should put this in the root of your application. | |
* However, you don't need to, but you would then need to | |
* pass a --path= option with the path to your app. | |
* This is because the li3 console command must be called | |
* from a specific location. |
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
<?php | |
/** | |
* A System model to work with MongoDB from a higher level. | |
* This model will executes various commands as well as store new commands. | |
* The system.js collection is used. | |
* | |
* Warning: There be dragons in here. | |
* | |
*/ | |
namespace app\models; |
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
var bogart = require('bogart'); | |
var Q = require('promised-io/lib/promise'); | |
var mongoose = require('mongoose'); | |
var PostSchema = new mongoose.Schema({ | |
title: String, | |
body: String, | |
comments: [ CommentSchema ] | |
}); |
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
from commandr import command, Run | |
@command('greet') | |
def Hi(name, title='Mr.', times=1): | |
'''Greet someone. | |
Arguments: | |
name - Name to greet. | |
title - Title of the person to greet. | |
times - Number of times to say the greeting. ''' | |
greeting = 'Hi %s %s!' % (title, name) |
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
<?php | |
/** | |
* Continuation routing examples. Handles URLs in the following forms: | |
* | |
* /posts | |
* /en/posts | |
* /admin/posts | |
* /admin/en/posts | |
* /admin/en/posts.json | |
* /admin/en/posts/4ef16ccc7f8b9aa331000064.json |
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
// 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; |
OlderNewer