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
| on url_encode(str) | |
| set ret to do shell script "ruby -e \"require 'uri'; print URI.encode('" & str & "', Regexp.new(\\\"[^#{URI::PATTERN::UNRESERVED}]\\\"))\"" | |
| return ret | |
| end url_encode | |
| tell application "BathyScaphe" | |
| set _text to selected text of document 1 | |
| set _title to title of document 1 | |
| set _url to URL of document 1 | |
| end tell |
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
| package { | |
| import flash.display.Sprite; | |
| import flash.external.ExternalInterface; | |
| [SWF(frameRate=1, background=0x000000)] | |
| public class Hello extends Sprite { | |
| public function Hello() { | |
| ExternalInterface.marshallExceptions = true; | |
| ExternalInterface.addCallback('hello', function():String { |
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
| (function($) { | |
| $.support.dataSchema = ( | |
| $.browser.msie && $.browser.version >= 8 || !$.browser.msie | |
| ); | |
| })(jQuery); |
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
| function FindProxyForURL(url, host) { | |
| var proxy = 'localhost:5432'; | |
| var domain = 'example.com'; | |
| return (dnsDomainIs(host, domain) && shExpMatch(url, '*.js')) ? | |
| 'PROXY '+proxy : | |
| 'DIRECT'; | |
| } |
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
| javascript:alert(prompt('Reverse!').split('').reverse().join('')); |
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
| require 'rubygems' | |
| require 'httpclient' | |
| require 'pit' | |
| def growl(title, message, options = {}) | |
| arg = '' | |
| options.each {|k, v| arg << " --#{k}" + (v == true ? '' : " \"#{v}\"") } | |
| `/usr/local/bin/growlnotify -t "#{title}" -m "#{message}"#{arg}` | |
| end |
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
| var Cycle = function(interval) { | |
| if (interval) this.interval = interval; | |
| }; | |
| Cycle.prototype = { | |
| queue : null, | |
| timer : null, | |
| interval : 500, | |
| start_time: 0, | |
| start: function() { |
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
| $.support.dataSchema = ($.browser.msie && $.browser.version >= 8 || !$.browser.msie); | |
| $.support.console = !(!window.console || !window.console.log); |
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
| on run {input, parameters} | |
| repeat with f in input | |
| try | |
| tell application "Finder" to set file type of file f to "MooV" | |
| end try | |
| end repeat | |
| tell application "iTunes" to add input | |
| return input | |
| end run |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'sequel' | |
| require 'google_chart' | |
| require 'open-uri' | |
| (size, color) = *ARGV | |
| size = size || '640x240' | |
| color = color || 'a8bccb' |