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 syntax file | |
" Language: JSON | |
" Maintainer: Jeroen Ruigrok van der Werven <[email protected]> | |
" Last Change: 2009-06-16 | |
" Version: 0.4 | |
" {{{1 | |
" Syntax setup {{{2 | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded |
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
ls *.png | awk '{split($0,s,".");printf( "convert %s -bordercolor transparent -border 5 \\( +clone -channel A -morphology EdgeOut Octagon:5 +channel +level-colors white \\) -compose DstOver -composite \\( +clone -background black -shadow 60x5+5+5 \\) -background transparent -layers merge +repage %s_outline.png\n", $0, s[1] );}' | /bin/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
#!/usr/bin/python | |
import os | |
import settings | |
fn = 'drop_tables.sql' | |
try: | |
os.remove( fn ) | |
except: | |
pass |
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
#!/usr/bin/python | |
# Alternative approach. | |
import os | |
import MySQLdb | |
print 'drop remaining tables...' | |
for name, db in settings.DATABASES.iteritems(): | |
conn = MySQLdb.connect( db['HOST'], db['USER'], db['PASSWORD'], db['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
#define CONCAT_X(t1,t2) t1##t2 | |
#define CONCAT(t1,t2) CONCAT_X(t1,t2) | |
/* usage */ | |
#define PREFIX TAEYEON__ | |
#define foo CONCAT(PREFIX,foo) | |
void foo() {} /* this function will be renamed into 'TAEYEON__foo' */ |
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
digraph idc { | |
nodesep="1.0"; | |
ranksep="2.0"; | |
node [fontname="Verdana", shape="record", fontsize="15"] | |
edge [fontname="Verdana", fontsize="10"] | |
subgraph cluster_LB { | |
label="Load Balancers"; | |
{ rank = same; l2 l1; } |
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/sh | |
### BEGIN INIT INFO | |
# Provides: cloudfuse | |
# Should-Start: $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: | |
# Short-Description: fast remote file copy program daemon | |
# Description: Cloudfuse is a FUSE application which provides access to | |
# Rackspace's Cloud Files (or any installation of Swift). |
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
echo ".DS_Store" >> /etc/gitignore | |
git config --system core.excludesfile /etc/gitignore | |
( must with write privileges in /etc directory ) |
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 kenburn_random( force_zoom ) | |
{ | |
var xpos = Math.floor(Math.random() * 100); | |
var ypos = Math.floor(Math.random() * 100); | |
var zoom = (Math.random()*3); | |
if( zoom < 1.0 || force_zoom == 1 ) zoom = 1.0; | |
return xpos+'% '+ypos+'% '+zoom+'x'; | |
} | |
/* usage |
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
/* | |
* Swipe 1.0 | |
* | |
* Brad Birdsall, Prime | |
* Copyright 2011, Licensed GPL & MIT | |
* | |
*/ | |
window.Swipe = function(element, options) { |
OlderNewer