This file contains hidden or 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
64.242.88.10 - - [07/Mar/2004:16:05:49 -0800] "GET /twiki/bin/edit/Main/Double_bounce_sender?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846 | |
64.242.88.10 - - [07/Mar/2004:16:06:51 -0800] "GET /twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4523 | |
64.242.88.10 - - [07/Mar/2004:16:10:02 -0800] "GET /mailman/listinfo/hsdivision HTTP/1.1" 200 6291 | |
64.242.88.10 - - [07/Mar/2004:16:11:58 -0800] "GET /twiki/bin/view/TWiki/WikiSyntax HTTP/1.1" 200 7352 | |
64.242.88.10 - - [07/Mar/2004:16:20:55 -0800] "GET /twiki/bin/view/Main/DCCAndPostFix HTTP/1.1" 200 5253 | |
64.242.88.10 - - [07/Mar/2004:16:23:12 -0800] "GET /twiki/bin/oops/TWiki/AppendixFileSystem?template=oopsmore¶m1=1.12¶m2=1.12 HTTP/1.1" 200 11382 | |
64.242.88.10 - - [07/Mar/2004:16:24:16 -0800] "GET /twiki/bin/view/Main/PeterThoeny HTTP/1.1" 200 4924 | |
64.242.88.10 - - [07/Mar/2004:16:29:16 -0800] "GET /twiki/bin/edit/Main/Header_checks?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851 | |
64.242.88.10 - - [07/Mar/2004:16:30:29 -08 |
This file contains hidden or 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
$foo = "Hello"; | |
function alert_a() { | |
global $foo; | |
$bar = " World"; | |
echo ($foo . $bar); | |
} |
This file contains hidden or 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
# cut video at minute 00:00:40 for 4 second. | |
avconv -i video.mp4 -vcodec copy -acodec copy -ss 00:00:40 -t 00:00:04 output.mp4 |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<title>How good are Malaysian artists? See it for yourself.</title> | |
<meta name="title" content="How good are Malaysian artists? See it for yourself."/> | |
<meta name="description" content="Check out Prudential Malaysian Eye, a contemporary art exhibition featuring Malaysian artists from now to the end of April."/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta property="og:title" content="How good are Malaysian artists? See it for yourself." /> | |
<meta property="og:description" content="Check out Prudential Malaysian Eye, a contemporary art exhibition featuring Malaysian artists from now to the end of April." /> |
This file contains hidden or 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
class Messaging(object): | |
def __init__(self, user, sender, receiver, message): | |
self.user = user | |
self.sender = sender | |
self.receiver = receiver | |
self.message = message | |
def send(self): | |
required_points = self.get_required_points() | |
if required_points > self.user.points: |
This file contains hidden or 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
{% load sekizai_tags %} | |
<doctype html> | |
<html> | |
<head> | |
{% block css %}{% endblock %} | |
{% render_block "css" %} | |
</head> | |
<body> | |
{% block content %} | |
{% endblock %} |
This file contains hidden or 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 reportlab.pdfgen.canvas import Canvas | |
class NumberedCanvas(Canvas): | |
def __init__(self, *args, **kwargs): | |
Canvas.__init__(self, *args, **kwargs) | |
self._saved_page_states = [] | |
def showPage(self): | |
self._saved_page_states.append(dict(self.__dict__)) | |
self._startPage() |
This file contains hidden or 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/bash | |
NAME=supervisord | |
SUPERVISORD=/usr/bin/supervisord | |
SUPERVISORCTL=/usr/bin/supervisorctl | |
PIDFILE=$HOME/var/run/supervisord.pid | |
OPTS="-c $HOME/etc/supervisord.conf" | |
PS=$NAME | |
TRUE=1 | |
FALSE=0 |
This file contains hidden or 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
class Database(object): | |
def save(self, using=default_db, force=False): | |
pass | |
# override | |
class MyDatabase(Database): | |
def save(self, custom_flag=1, *args, **kwargs): | |
# use custom_flag | |
if custom_flag: | |
pass |
This file contains hidden or 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/bash | |
read -r line | |
read -r REQUEST_METHOD REQUEST_URI REQUEST_HTTP_VERSION <<< "$line" | |
# parse url such as http://localhost:9000/?name=kamal | |
GET=$(echo "$REQUEST_URI" | sed 's/^\/?//g' | sed 's/&/ /g') | |
# pass to php for actual processing | |
output=$(php5-cgi -f index.php "$GET") |