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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
queryParams: ['sort'], | |
sort: 'id', | |
xsortedMessages: Ember.computed.sort('model', 'sort'), |
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
module Mongoid | |
class Criteria | |
def none | |
@none = true and self | |
end | |
def empty_and_chainable? | |
!!@none | |
end | |
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
(* | |
This script opens a new Terminal.app tab in the directory of the current tab with the same settings. You’ll need to, if you haven’t already, enable access for assistive devices as described here: http://www.macosxautomation.com/applescript/uiscripting/index.html | |
It’s almost all the work of two scripts put together, thank you to them: | |
Chris Johnsen’s script opens a new tab in the current directory: http://superuser.com/questions/61149/os-x-terminal-app-how-to-start-a-new-tab-in-the-same-directory-as-the-current-ta/61264#61264 | |
Jacob Rus’s “menu_click” lets me create the tab with the same settings, as Terminal’s API doesn’t: http://hints.macworld.com/article.php?story=20060921045743404 | |
If you change the name of a Terminal profile, the AppleScript API returns the old name until you restart the application, so the script won’t work on renamed settings until then. Ugh. Also, the necessity of activating Terminal to execute the menu command brings all the terminal windows to the front. |
NewerOlder