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
alert(1) |
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 | |
class BracesToken { | |
private $ch = null; | |
// store char index for simplicity | |
private $index = null; | |
// keys are opening braces | |
// values are theirs closing brases respectively | |
private static $pairs = array('[' => ']', '(' => ')', '{' => '}'); |
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
def debug_shell(locals): | |
import code | |
import readline | |
import rlcompleter | |
# do something here | |
vars = globals() | |
vars.update(locals) | |
readline.set_completer(rlcompleter.Completer(vars).complete) |
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 | |
function potx_drush_command() { | |
$items['po-import'] = array( | |
'aliases' => array('poi'), | |
'description' => "Update project translations from po-files.", | |
'examples' => array( | |
'drush po-import' => 'Re-import all po-files from enabled modules', | |
'drush po-import mymodule1 mymodule2' => 'Re-import po-files from specified modules', | |
), |
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 | |
############################################################################### | |
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
# Global Map Tiles Classes | |
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
# generate a simple HTML viewers based on Google Maps and OpenLayers | |
# Author: Klokan Petr Pridal, klokan at klokan dot cz | |
# Web: http://www.klokan.cz/projects/gdal2tiles/ | |
# | |
############################################################################### |
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() { | |
var db = openDatabase('friends', '0', 'Offline friends storage', 1024*1024, function (db) { | |
db.changeVersion('', '0', function (t) { | |
t.executeSql('CREATE TABLE friends (id UNIQUE, name, ava)'); | |
t.executeSql('CREATE TABLE history (event, data, time DEFAULT (CURRENT_TIMESTAMP))'); | |
}); | |
}); | |
function logDeleted(friend) { | |
db.transaction(function(t) { |