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.path | |
import os | |
import sys | |
import datetime | |
class AtomWriter: | |
def __init__ (self, title, link = "http://localhost"): | |
self.title = title | |
self.link = link |
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/ruby | |
# This script watches modifications on the given directory, using the new | |
# FSEvents API in Leopard. | |
# This is a modification from the original watch script provided by Apple's Developer Package | |
# usage: watch [path/to/watch] [bash cmd to execute] | |
# by Julius Eckert | |
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
""" | |
Parse the wikipedia dump into tiny parts. | |
""" | |
import sys, string | |
from xml.sax import saxutils, handler, make_parser | |
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 | |
# This script performs an automated update of your wordpress blog. | |
# Please perform still some logical check (dbupdate, blog testing afterwards and so on) | |
# No error checking included! | |
WORKDIR=$HOME/public_html | |
BLOG_DIR=blog | |
WORDPRESS_URL=http://wordpress.org/latest.zip |
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 | |
URL=url_with_zips | |
LINKS=`curl $URL | grep -o "http:.*.zip"` | |
for link in $LINKS | |
do | |
FILENAME=`echo $link | grep -o "[A-Za-z0-9_]*.zip" | grep -o "[A-Za-z0-9_]*"` | |
TIME_LS=`ls --full-time $FILENAME.zip` | |
if [ -f $FILENAME.zip ]; then |
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
#Copyright Jon Berg , turtlemeat.com | |
# Modified by Stephan Zeissler, moinz.de | |
### | |
# Creates a simple webserver running on port 80 | |
# Every request is logged into a request-<id>.log file containg the path, headers and body | |
# The response is always 200 and the content of the file response.txt | |
### | |
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 | |
/** | |
* Code Highlighter | |
* | |
* Colorizes code strings | |
* | |
* @access public | |
* @param string the text string | |
* @return string | |
*/ |
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
wp-recentcomments/core.php | |
Line 186 | |
- $json .= '"reviewerName":"' . $comment->comment_author . '",'; | |
+ $json .= '"reviewerName":"' . htmlentities($comment->comment_author) . '",'; |
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 amqp = require('amqp'), | |
util = require('util'); | |
var con = amqp.createConnection(); | |
con.on('ready', function () { | |
con.exchange('new-users', {type: 'fanout', confirm: true}, function (ex) { | |
ex.setMaxListeners(100); | |
var counter = 0, |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"image" | |
"image/png" | |
"image/color" | |
) | |
func paintImage(img *image.RGBA) { |
OlderNewer