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
-- A script to have Paparazzi! <http://www.derailer.org/paparazzi/> take a screentshot | |
-- and save it. | |
-- by Benny Wong | |
-- 2008/10/02 | |
-- | |
-- Shamelessly adapted from <http://bbs.macscripter.net/viewtopic.php?pid=82666> | |
-- | |
-- Usage: | |
-- $ osascript screenshotous.scpt URL FILENAME | |
-- |
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
497c497 | |
< if (smURL.match(/.swf/)) { | |
--- | |
> if (smURL.match(/.swf$/)) { |
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
@@ -95,8 +95,8 @@ | |
this._defaultFlashVersion = 8; | |
this.filePatterns = { | |
- flash8: /.mp3/i, | |
- flash9: /.mp3/i | |
+ flash8: /\.mp3(\?.*)?$/i, | |
+ flash9: /\.mp3(\?.*)?$/i | |
}; | |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>canPlayUrl Test</title> | |
<script src="soundmanager2.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> |
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
--- a/lib/sinatra.rb | |
+++ b/lib/sinatra.rb | |
@@ -1260,7 +1260,8 @@ module Sinatra | |
request.env['rack.errors'] << msg | |
request.env['sinatra.error'] = e | |
- context.status(500) | |
+ status = e.class.respond_to?(:code) ? e.class.code : 500 | |
+ context.status(status) | |
raise if options.raise_errors && e.class != NotFound |
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
@tuples = sort { $a->[0] <=> $b->[0] } @tuples; | |
my $dates = map { $_->[0] } @tuples; | |
my $values = map { $_->[1] } @tuples; |
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
function click(theFunction) { | |
// Something happens | |
theFunction(event); | |
} | |
// Example 1 | |
$('a').click(alert('hi')); | |
// Example 2: this does the same thing as example 1 | |
alert_result = alert('hi'); |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>test</title> | |
<!-- JQUERY --> | |
<script type="text/javascript" charset="utf-8"> |
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
filter(P, [H|T]) -> | |
case P(H) of | |
true -> [H|filter(P, T)]; | |
false -> filter(P, T) | |
end; | |
filter(P, []) -> | |
[]. | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
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 | |
require 'aws/s3' | |
class GitRepoArchiver | |
attr_reader :repo_name, :repo_dir, :bucket | |
def init(args) | |
# Change the current working directory |
OlderNewer