Skip to content

Instantly share code, notes, and snippets.

$ sudo npm publish .
npm it worked if it ends with ok
npm cli [ 'publish', '.' ]
npm version 0.1.26
npm config file /Users/jbr/.npmrc
npm config file /usr/local/etc/npmrc
npm publish [ '.' ]
npm packTar . /Users/jbr/.node_libraries/.npm/.cache/sibilant/0.0.5/package.tgz
npm exec tar "czf" "/Users/jbr/.node_libraries/.npm/.cache/sibilant/0.0.5/package.tgz" "--exclude" ".git" "-X" "/Users/jbr/.node_libraries/.npm/npm/0.1.26/package/lib/utils/default.npmignore" "sibilant"
npm exec tar "xzf" "/Users/jbr/.node_libraries/.npm/.cache/sibilant/0.0.5/package.tgz" "--strip-components=1" "-C" "/Users/jbr/.node_libraries/.npm/.cache/sibilant/0.0.5/package"
after 'deploy:update_code', 'bundler:bundle_new_release'
namespace :bundler do
task :bundle_new_release do
run "cd #{release_path} && bundle install --without test --deployment --quiet"
end
end
@jbr
jbr / bay-area-food
Last active September 5, 2015 14:14
Things worth eating in the bay area
This is an unordered list
I am a vegetarian
East Bay:
Cheese puffs from gregoire
From e22317131b97d0faa5510b528ef515ccbbbd3e8e Mon Sep 17 00:00:00 2001
From: Jacob Rothstein <[email protected]>
Date: Tue, 13 Jul 2010 13:24:34 -0700
Subject: [PATCH] fix showdown to work in chrome (don't use RegExp.leftContext and RegExp.rightContext globals)
---
scripts/showdown.js | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/scripts/showdown.js b/scripts/showdown.js
@jbr
jbr / antonym_accessor.rb
Created June 24, 2010 22:58
antonym_accessor
class Module
def antonym_accessor(*args)
if 2 == args.length
from, to = args
define_method("#{to}?") { not send "#{from}?" }
define_method("#{to}=") {|val| send "#{from}=", ! val }
elsif 1 == args.length && args.first.is_a?(Hash)
args.first.each {|from, to| antonym_accessor from, to}
else
raise <<-EXCEPTION
@jbr
jbr / emacs.el
Created June 23, 2010 23:50
emacs config
;; my ~/.emacs config as of Dec 1
(setq load-path (cons "~/.emacs.d" load-path))
(setq load-path (cons "~/.emacs.d/textmate.el" load-path))
(setq load-path (cons "~/.emacs.d/color-theme-6.6.0" load-path))
(setq load-path (cons "~/.emacs.d/magit" load-path))
(when window-system
(set-default-font
(concat "-apple-Anonymous_Pro-"
From b3927509174147bc7fc042e6b900be877c226a41 Mon Sep 17 00:00:00 2001
From: Jacob Rothstein <[email protected]>
Date: Wed, 16 Jun 2010 13:40:27 -0700
Subject: [PATCH] splat out ESCAPE_HTML.keys for older rubies
---
lib/rack/utils.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
exports.set = function () {
var members = {}
, eachArgument = function (args, fn) { Array.prototype.slice.apply(args).forEach (fn) }
, set = function (item) { return members.hasOwnProperty (item) }
set.has = set
set.union = function (other) {
var union = exports.set.apply ({}, set.members)
union.add.apply (set, other.members)
class ActiveRecord::Base
def destroy
unless new_record?
rows = connection.delete(
"DELETE FROM #{self.class.quoted_table_name} " +
"WHERE #{connection.quote_column_name(self.class.primary_key)} = #{quoted_id}",
"#{self.class.name} Destroy"
)
end
$ scons libxmljs.node
scons: Reading SConscript files ...
Checking for node.js ...(cached) yes
True
Checking for C++ library xml2... (cached) yes
Checking for node.js ...(cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/xml_document.os -c -I/opt/local/include -I/opt/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/include/libxml2 -rdynamic -D_GNU_SOURCE -DEV_MULTIPLICITY=0 -DHAVE_CONFIG_H=1 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux2 -DNDEBUG -g -O3 -I/usr/local/include/node -fPIC src/xml_document.cc
g++ -o src/xml_element.os -c -I/opt/local/include -I/opt/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/include/libxml2 -rdynamic -D_GNU_SOURCE -DEV_MULTIPLICITY=0 -DHAVE_CONFIG_H=1 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux2 -DNDEBUG -g -O3 -I/usr/local/include/node -fPIC src/xml_element.cc