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 chrome = Application('Google Chrome'); | |
var safari = Application('Safari'); | |
safari.includeStandardAdditions = true; // Needed for openLocation() | |
chrome.windows[0].tabs().forEach(function (tab) { | |
safari.openLocation( tab.url() ); | |
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 "Google Chrome" | |
set tab_list to every tab in the front window | |
repeat with the_tab in tab_list | |
set the_url to the URL of the_tab | |
tell application "Safari" to open location the_url | |
end repeat | |
end tell |
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(){ | |
var p = Date.prototype; | |
p.val = 0; | |
p.add = function(num) { | |
this.val = num; | |
return this; | |
}; | |
p.subtract = function(num) { |
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
// underscore-pickrandom.js | |
// (c) 2012 Simon Kågedal Reimer | |
// This file is freely distributable under the MIT license. | |
// _.pickRandom - a mixin for underscore.js. | |
// | |
// Pick random elements from an array. Works similar to | |
// `_.first(_.shuffle(array, n))`, but is more efficient -- operates | |
// in time proportional to `n` rather than the length of the whole | |
// array. |
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
// Underscore mixing for partial functions and async calls. | |
// Based on this microsoft post: http://msdn.microsoft.com/en-us/scriptjunkie/gg575560 | |
_.mixin({ | |
// Turn a normal function into an asynchronous version. | |
// It will return a function that expect's the last argument | |
// to be a callback expecting (err, result) as arguments. | |
wrapAsync: function(fn) { | |
return function() { | |
var args = _(arguments).toArray(); |
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
/**********************************************/ | |
/* | |
/* Solarized Dark Skin by Mark Osborne - 2011 | |
/* | |
/* Based on IR_Black Skin by Ben Truyman: | |
/* https://gist.github.com/1245727 | |
/* | |
/* and Todd Werth's IR_Black: | |
/* http://blog.toddwerth.com/entries/2 | |
/* |
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" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>user.launchkeep.iterm</string> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Program</key> | |
<string>/Applications/iTerm.app/Contents/MacOS/iTerm</string> |
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
/** | |
* Inherit prototype properties | |
* @param {Function} ctor | |
* @param {Function} superCtor | |
*/ | |
_.mixin({ | |
inherits: (function(){ | |
function noop(){} | |
function ecma3(ctor, superCtor) { |
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(window,undefined){ | |
// Prepare our Variables | |
var | |
document = window.document, | |
$ = window.jQuery; | |
// Wait for Document | |
$(window).bind(function(){ | |
// Prepare Variables |
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
<?php | |
// Our Page Action | |
public function pageAction ( ) { | |
// Prepare our variables for our view | |
// ... | |
// Handle our view | |
return $this->awesomeRender('page.html'); | |
} | |
NewerOlder