Skip to content

Instantly share code, notes, and snippets.

@backspace
backspace / new_tab_current_directory_and_settings.scpt
Created May 19, 2011 05:17
An AppleScript that opens a new tab in the current directory with the current settings
(*
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.
@backspace
backspace / mongoid-none.rb
Last active August 29, 2015 14:01
Backports Criteria.none to Mongoid 3
module Mongoid
class Criteria
def none
@none = true and self
end
def empty_and_chainable?
!!@none
end
end
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
queryParams: ['sort'],
sort: 'id',
xsortedMessages: Ember.computed.sort('model', 'sort'),

Keybase proof

I hereby claim:

  • I am backspace on github.
  • I am bucktravis (https://keybase.io/bucktravis) on keybase.
  • I have a public key whose fingerprint is 8A82 4536 065B DB2D 4037 D989 7128 6582 323A 3262

To claim this, I am signing this object:

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
deleteRecord(item) {
item.deleteRecord();
}
}
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@backspace
backspace / _universe-2017.md
Last active October 4, 2017 08:36 — forked from MariadeAnton/hi-satellite.md
Travis CI Demo Examples - GitHub Universe 2017
04c0af799b319ca5d7d8a0eb08db8d2dabb19e22fa5fe1873f9cf52f0a818389c280817cdcedf0a13a6413d0b29e9ecd8218942b80de796a4cd82a75915149572d
import Ember from 'ember';
export default Ember.Component.extend({
});
@backspace
backspace / keybase.md
Created October 22, 2019 18:08
Keybase

Keybase proof

I hereby claim:

  • I am backspace on github.
  • I am buckdoyle (https://keybase.io/buckdoyle) on keybase.
  • I have a public key ASBoCTQWce3Bp7jchTYfSahWUK4g02zZ3mXTyMzSt9q2NQo

To claim this, I am signing this object: