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
tell application "iTunes" | |
-- Check existence of the "Perfect" equalizer preset | |
repeat with preset in EQ presets | |
if name of preset is "Perfect" then | |
return | |
end if | |
end repeat | |
-- Add the "Perfect" equalizer preset |
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
<?xml version="1.0"?> | |
<Module> | |
<ModulePrefs title="Gist"> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<UserPref name="id" display_name="Gist ID" required="true" default_value="10683373"/> | |
<UserPref name="font_size" display_name="Font size (px)" required="true" default_value="12"/> | |
<UserPref name="line_height" display_name="Line height (px)" required="true" default_value="16"/> | |
<Content type="html"> | |
<![CDATA[ |
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
on run {input} | |
set command to "cd " & POSIX path of input | |
tell application "Terminal" | |
if application "Terminal" is running then | |
activate | |
do script command | |
else | |
launch | |
activate | |
do script command in window 1 |
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
Ext.Ajax.request({ | |
url: 'hello.json', | |
success: function(response, opts) { | |
var hello = getMessage(response); | |
Ext.Ajax.request({ | |
url: 'world.json', | |
success: function(response, opts) { | |
var world = getMessage(response); | |
Ext.Msg.alert('Success', hello + world); | |
}, |
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
Ext.Deferred.all([fetch('hello.json'), fetch('world.json')]) | |
.then(function(responses) { | |
var hello = getMessage(responses[0]), | |
world = getMessage(responses[1]); | |
Ext.Msg.alert('Success', hello + world); | |
}) | |
.otherwise(function(response) { | |
var error = getMessage(response); | |
Ext.Msg.alert('Failure', error); | |
}); |
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
var hello, world; | |
fetch('hello.json') | |
.then(function(response) { | |
hello = getMessage(response); | |
return fetch('world.json'); | |
}) | |
.then(function(response) { | |
world = getMessage(response); | |
Ext.Msg.alert('Success', hello + world); |
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
require 'json' | |
require 'open-uri' | |
def complete(query) | |
q = URI.escape(query) | |
url = "http://suggestqueries.google.com/complete/search?q=#{q}&client=firefox&hl=ja" | |
json = open(url).read | |
JSON.parse(json).last | |
end |
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
export CLICOLOR= | |
export GREP_OPTIONS="--color=auto" | |
export HISTSIZE= | |
export HISTTIMEFORMAT="%F %T " | |
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion | |
if type __git_ps1 > /dev/null 2>&1; then | |
PROMPT_COMMAND="__git_ps1 '\h:\W \u' '\\\$ '; $PROMPT_COMMAND" | |
GIT_PS1_SHOWDIRTYSTATE=true |
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
unlet! skip_defaults_vim | |
source $VIMRUNTIME/defaults.vim | |
set expandtab | |
set hlsearch | |
set shiftwidth=4 | |
set softtabstop=4 | |
set tabstop=4 | |
nnoremap <Esc><Esc> :nohlsearch<CR> |
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
tell application "Safari" to set bounds of the front window to {0, 0, 1280, 720} |