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
(defun xcode-buildandrun () | |
(interactive) | |
(do-applescript "tell application \"Xcode\" | |
activate | |
end tell | |
tell application \"System Events\" | |
key code 15 using {command down} | |
end tell")) |
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
/* Jit-nt.xs: no threads, no JUMPTABLE | |
* | |
* Copyright (C) 2010 by Reini Urban | |
* | |
* You may distribute under the terms of either the GNU General Public | |
* License or the Artistic License, as specified in the README file. | |
* | |
* http://gist.github.com/331867 | |
*/ |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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 | |
# | |
# fastpack - a simple App::FatPacker helper | |
# | |
if [ -z "$1" ]; then | |
echo "usage: fastpack script.pl > script.packed.pl" | |
exit 0 | |
fi |
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
diff --git a/lib/Plack/App/WrapCGI.pm b/lib/Plack/App/WrapCGI.pm | |
index 7f0a7a7..925b2e9 100644 | |
--- a/lib/Plack/App/WrapCGI.pm | |
+++ b/lib/Plack/App/WrapCGI.pm | |
@@ -2,7 +2,7 @@ package Plack::App::WrapCGI; | |
use strict; | |
use warnings; | |
use parent qw(Plack::Component); | |
-use Plack::Util::Accessor qw(script _app); | |
+use Plack::Util::Accessor qw(script run_on_shell _app); |
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
from google.appengine.ext import webapp | |
def _adjust_path_info(script_path, environ): | |
if environ["PATH_INFO"].startswith(script_path): | |
environ["SCRIPT_NAME"] += script_path | |
environ["PATH_INFO"] = environ["PATH_INFO"][len(script_path):] | |
def as_handler(wsgi): | |
class WSGIHandler(webapp.RequestHandler): |
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 perl | |
use strict; | |
use warnings; | |
# Usage: cpan-outdated -v | diffchanges.pl | |
use LWP::UserAgent; | |
use Algorithm::Diff; | |
my $ua = LWP::UserAgent->new; |
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 Plack::Middleware::Parallel::Scoreboard; | |
use strict; | |
use warnings; | |
use parent qw(Plack::Middleware); | |
use Plack::Util::Accessor qw(board base_dir path); | |
use Parallel::Scoreboard; | |
our $VERSION = '0.01'; | |
sub prepare_app { | |
my $self = shift; |
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 | |
use strict; | |
use warnings; | |
use MozRepl; | |
use Net::Pcap::Easy; | |
my ($ustream_url, $file, $stop, $device) = @ARGV; | |
my $usage = <<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
package Plack::Middleware::Random; | |
use strict; | |
use warnings; | |
use parent qw(Plack::Middleware); | |
use POSIX qw(floor); | |
my $known_requests = []; | |
sub call { |
OlderNewer