- Web+DB vol.59 嫁
alternatives
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"}) |
- (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] |
-- code | |
display dialog "Welcome to AppleScript." | |
-- declare & initialize a variable | |
set myName to "John" | |
copy 33 to myAge | |
-- objects | |
startup disk -- built-in object |
require Dir::pwd + "/../twsvr" | |
require "bacon" | |
require "rack/test" | |
class Bacon::Context | |
include Rack::Test::Methods | |
def app | |
Sinatra::Application | |
end |
#!/bin/sh | |
osascript <<'APPLESCRIPT' | |
tell application "Safari" | |
tell its first document | |
set its URL to (get its URL) | |
end tell | |
end tell | |
APPLESCRIPT |
var | |
starter = $('#base img'), | |
th = starter.length, | |
cnt = 0; | |
starter.one("load",function(){ | |
(++cnt >= th) && run(); | |
}) | |
.each(function(){ | |
if(this.complete) starter.trigger("load"); |
#!/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 &" |
app.is_android2p2 = (navigator.userAgent ||"").search(/Android\s*2.2/) > -1 ? true:false; |
エンジニアの人って割と白黒のログ眺めてる人が多い気がしますが、僕は何かと色つけたい派ですね。 | |
bash に | |
ctail(){ tail -f $1 | perl -pe 's/'$2'/\033\[1;35m$&\033\[0m/gi'; } | |
と書いて | |
ctail /var/log/system.log "(error|exception|unable)" | |
とかやってます |