- Go to Tools > New Plugin
- Paste timestamp.py contents and save in User as timestamp.py
- Open Preferences > Key Bindings - User (or Default, your call)
- Paste keybindings.json, or add a line to your keybindings
- Customize the keyboard shortcut to your liking and save
View convert_sf_id.js
function convertId(id) { | |
if (id == null) return id; | |
id = id.replace(/\"/g, ''); | |
if (id.length != 15) { | |
return null; | |
} | |
var suffix = ""; | |
for (var i = 0; i < 3; i++) { | |
var flags = 0; | |
for (var j = 0; j < 5; j++) { |
View README.md
View keybase.md
Keybase proof
I hereby claim:
- I am tpitale on github.
- I am tpitale (https://keybase.io/tpitale) on keybase.
- I have a public key whose fingerprint is 6C17 F481 4889 B9AD 61EC 7719 A2EA 6E3E FD48 2FE3
To claim this, I am signing this object:
View errors_test.js
// Added to the bottom of tests/unit/model/errors_test.js | |
var env, store, Person, Dog; | |
module("unit/model/errors - model.save() triggers errors", { | |
setup: function() { | |
Person = DS.Model.extend({ | |
firstName: DS.attr(), | |
lastName: DS.attr() | |
}); |
View gist:93428db182dd44ec52e5
import os; path=sublime.packages_path(); (os.makedirs(path) if not os.path.exists(path) else None); window.run_command('exec', {'cmd': ['git', 'clone', 'https://github.com/titoBouzout/SideBarEnhancements', 'SideBarEnhancements'], 'working_dir': path}) | |
import os; path=sublime.packages_path(); window.run_command('exec', {'cmd': ['git', 'checkout', '37429739a0452a2dc36343fb7875ba7fcbeb88a9'], 'working_dir': os.path.join(path, 'SideBarEnhancements')}) |
View data.tsv
letter | frequency | |
---|---|---|
A | .08167 | |
B | .01492 | |
C | .02782 | |
D | .04253 | |
E | .12702 | |
F | .02288 | |
G | .02015 | |
H | .06094 | |
I | .06966 |
View wait_for_notify.rb
def wait_for_notify(&block) | |
io = pg_connection.socket_io | |
while @listening do | |
Celluloid::IO.wait_readable(io) # blocks execution, but unblocks this actor | |
pg_connection.consume_input # fetch any input on this connection | |
# read the NOTIFY messages off the socket | |
while notification = pg_connection.notifies do | |
block.call( |
View spec_helper.rb
RSpec.configure do |config| | |
config.expect_with :rspec do |c| | |
c.syntax = :expect | |
end | |
end |
View empty-rows-missing.rb
# connection and profile selection skipped | |
class Pageview | |
extend Legato::Model | |
metrics :pageviews | |
dimensions :pagePath, :date | |
filter :for_path, &lambda { |path| contains(:pagePath, path) } | |
end |
View too_clever.rb
[1,2,3,4,5].each_cons(2).each_with_index do |(a, b), i| | |
p a | |
p b | |
p i | |
end |