- Web+DB vol.59 嫁
alternatives
| #!/usr/bin/env osascript | |
| do shell script "/Applications/Chromes/dev/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --user-data-dir=/Users/$USER/Library/Application\\ Support/Google/ChromeDev > /dev/null 2>&1 &" |
| var | |
| starter = $('#base img'), | |
| th = starter.length, | |
| cnt = 0; | |
| starter.one("load",function(){ | |
| (++cnt >= th) && run(); | |
| }) | |
| .each(function(){ | |
| if(this.complete) starter.trigger("load"); |
| #!/bin/sh | |
| osascript <<'APPLESCRIPT' | |
| tell application "Safari" | |
| tell its first document | |
| set its URL to (get its URL) | |
| end tell | |
| end tell | |
| APPLESCRIPT |
| require Dir::pwd + "/../twsvr" | |
| require "bacon" | |
| require "rack/test" | |
| class Bacon::Context | |
| include Rack::Test::Methods | |
| def app | |
| Sinatra::Application | |
| end |
| -- code | |
| display dialog "Welcome to AppleScript." | |
| -- declare & initialize a variable | |
| set myName to "John" | |
| copy 33 to myAge | |
| -- objects | |
| startup disk -- built-in object |
| - (void)viewDidLoad { | |
| [super viewDidLoad]; | |
| UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] | |
| initWithBarButtonSystemItem:UIBarButtonSystemItemAdd | |
| target:self | |
| action:@selector(showAddOptions)] autorelease]; | |
| self.navigationItem.rightBarButtonItem = addButton; | |
| } | |
| - (void) showAddOptions { | |
| NSString *sheetTitle = [[NSString alloc] |
| using terms from application "Quicksilver" | |
| on process text t | |
| my ActivateApp(t) | |
| end process text | |
| end using terms from | |
| on ActivateApp(t) | |
| tell application t | |
| activate | |
| menu_click({t, "Window", "Bring All to Front"}) |
| #!/usr/bin/env ruby | |
| $LOAD_PATH << "#{ENV["TM_SUPPORT_PATH"]}/lib" | |
| require "web_preview" | |
| class SymfonyLimeTest | |
| attr_reader :root_dir, :test_file | |
| def initialize(args=ENV) |
| echo `pbpaste` | ruby -e 'require "uri";print $<.gets.chomp!.gsub!(/([^\/]+)/){|m| URI.escape(m)}' | pbcopy |