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/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
if __name__ == "__main__" : | |
src = "/opt/local/var/run/mysql5/mysqld.sock" | |
dest = "/tmp/mysql.sock" | |
if(not os.path.islink(dest) and not os.path.isfile(dest)): |
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 | |
/** | |
* Calls the render() method of the Extend view helper if needed | |
* | |
* @author Mon Zafra <monzee at gmail> | |
* @copyright (c)2009 Mon Zafra | |
* @category Mz | |
* @package | |
* @license http://mz-project.googlecode.com/svn/trunk/LICENSE MIT License |
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
/** | |
* Add this script to the end of your document that use <input autofocus type="text" /> | |
* or <input type="text" placeholder="username" /> and it'll plug support for browser | |
* without these attributes | |
* Minified version at the bottom | |
*/ | |
(function () { | |
function each(list, fn) { | |
var l = list.length; |
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
""" | |
Delete your old tweets (by old I mean all except latest 100) | |
without removing favorites of your own tweets and DM. | |
1/ Install python-twitter: http://code.google.com/p/python-twitter/ as ptwitter | |
2/ Patch it with http://code.google.com/p/python-twitter/issues/detail?id=60 | |
3/ Populates USERNAME and PASSWORD | |
Note that you're limited to 150 calls to the API per hour and that you can't | |
retrieve more than the 3200 latest tweets, it means that even if you relaunch |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css" /> | |
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg'></script> | |
<script src="http://openlayers.org/api/OpenLayers.js"></script> | |
<script src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script> | |
<script type="text/javascript"> | |
google.load("jquery", '1.4'); | |
google.load("maps", "2.x"); | |
</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
#!/usr/bin/env python | |
# coding=utf-8 | |
""" | |
Generate all the modules of the projects as SCORM2004r3 packages that match a | |
pattern. | |
This script work if your project as the following structure: | |
0123_project_root/ # 0123 = customer code | |
|-- .svn | |
|-- 0123_M01 # module 01 |
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 datetime | |
import subprocess | |
from django.conf import settings | |
from django.core.management.base import BaseCommand | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
class Command(BaseCommand): |
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
(r'^articles/(?P<year>\d{4}/?$, 'main.views.year'), | |
# When a use case comes up that a month needs to be involved as | |
# well, you add an argument in your regex: | |
(r'^articles/(?P<year>\d{4}/(?P<month>\d{2})/?$, 'main.views.year_month'), | |
# That works fine, unless of course you want to show something | |
# different for just the year, in which case the following case can be | |
# used, making separate views based on the arguments as djangoproject |
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
stage { "pre": before => Stage["main"] } | |
class python { | |
package { | |
"build-essential": ensure => latest; | |
"python": ensure => "2.6.6-2ubuntu1"; | |
"python-dev": ensure => "2.6.6-2ubuntu1"; | |
"python-setuptools": ensure => "latest"; | |
} | |
exec { "easy_install pip": | |
path => "/usr/local/bin:/usr/bin:/bin", |
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
http://mbostock.github.com/d3/ | |
http://g.raphaeljs.com/ | |
http://wijmo.com/ | |
http://highcharts.com/ | |
http://processingjs.org/ |
OlderNewer