Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 time | |
import random | |
random.seed(time.clock()) | |
print random.randint(0, 10000); | |
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
[Tue Nov 03 12:34:57 2009] [warn] FastCGI: (dynamic) server "/home/bobcousy/public_html/dispatch.fcgi" (pid 21547) terminated by calling exit with status '0' | |
[Tue Nov 03 12:34:57 2009] [warn] FastCGI: (dynamic) server "/home/bobcousy/public_html/dispatch.fcgi" (pid 21547) termination signaled | |
[Tue Nov 03 12:29:57 2009] [warn] FastCGI: (dynamic) server "/home/bobcousy/public_html/dispatch.fcgi" (uid 32262, gid 32264) restarted (pid 21547) | |
[Tue Nov 03 12:29:57 2009] [warn] FastCGI: (dynamic) server "/home/bobcousy/public_html/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds | |
[Tue Nov 03 12:28:55 2009] [warn] FastCGI: (dynamic) server "/home/bobcousy/public_html/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds | |
[Tue Nov 03 12:28:55 2009] [error] [client 216.156.136.2] FastCGI: incomplete headers (0 bytes) received from server "/home/bobcousy/public_ |
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
bobcousy@bobcousyslisp.com [~/public_html]# ./dispatch.fcgi | |
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! | |
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! | |
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! | |
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! | |
root INFO Reconfigured logging | |
typepadapp.utils.loading INFO Configuring HTTP caching | |
typepadapp.middleware.ApplicationMiddleware INFO Loading group info... | |
batchhttp.client WARNING Making batch request for 2 items | |
batchhttp.client WARNING Making batch request for 1 items |
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
bobcousy@bobcousyslisp.com [~/public_html]# cat dispatch.fcgi | |
#!/usr/local/bin/python2.5 | |
import sys | |
import os | |
sys.path.append('/home/bobcousy/local/lib/python2.5/site-packages') | |
sys.path.append('/home/bobcousy/public_html/mymotion') | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'mymotion.settings' |
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
bobcousy@bobcousyslisp.com [~/public_html]# cat .htaccess | |
AddHandler fastcgi-script .fcgi | |
# rewrite url request enabled | |
RewriteEngine On | |
# if the FILENAME requested isn't an actual file, perform the next command | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# send requested urn to the dispatch.fcgi to be processed | |
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L] |
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/perl -w | |
use strict; | |
use IO::Prompt; | |
use Try::Tiny; | |
use WWW::TypePad; | |
use WWW::TypePad::CmdLine; | |
my $tp = WWW::TypePad::CmdLine->initialize( requires_auth => 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
<html> | |
<body> | |
<h3>External Assets Example</h3> | |
<?php | |
/***** Utility methods + constants ******/ | |
define ("DEFAULT_DEBUG_MODE", 1); | |
define ("ROOT_TYPEPAD_API_URL", "http://api.typepad.com"); |
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
require WWW::Instapaper::Client; | |
my $paper = WWW::Instapaper::Client->new( | |
username => 'hellotypepad@mac.com', # E-mail OR username | |
password => '', | |
); | |
my $result = $paper->add( | |
url => 'http://hello.typepad.com/hello/2010/04/hbos-treme-creator-david-simon-explains-it-all-for-you.html', | |
title => "Treme Story", # optional, will try to get automatically if not given |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Activity widget</title> | |
</head> | |
<body> | |
<ul id="note-list"></ul> |
OlderNewer