Skip to content

Instantly share code, notes, and snippets.

Marnen Laibow-Koser marnen

Block or report user

Report or block marnen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active Jan 16, 2020
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@mattheworiordan
mattheworiordan / capybara_webkit_screenshot_env.rb
Created Aug 19, 2011
Cucumber and Capybara-Webkit automatic screenshots on failure
View capybara_webkit_screenshot_env.rb
def screen_shot_and_save_page
require 'capybara/util/save_and_open_page'
path = "/#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}"
Capybara.save_page body, "#{path}.html"
page.driver.render Rails.root.join "#{Capybara.save_and_open_page_path}" "#{path}.png"
end
begin
After do |scenario|
screen_shot_and_save_page if scenario.failed?
@dbi
dbi / edit.html.mustache
Created May 4, 2011
Rails form helper for mustache spike/proof of concept
View edit.html.mustache
<!-- A scaffolded edit view converted to mustache -->
<h1>Editing post</h1>
{{#form}}
{{#errors?}}
<div id="error_explanation">
<h2>{{error_header}}</h2>
</div>
<ul>
@ryanbriones
ryanbriones / gist:799139
Created Jan 27, 2011
Campfire emoji fortune cookie or conversation starter
View gist:799139
emoji = %w(
+1 -1 bulb
calling clap cop
email feet fish
fist gift hammer
heart leaves lipstick
lock mag mega
memo moneybag new
ok pencil punch
runner scissors smoking
@mkhl
mkhl / path_helper.patch
Created Jun 4, 2009
Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s
View path_helper.patch
Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s.
--- path_helper_bak 2009-05-07 15:54:37.000000000 +0200
+++ path_helper 2009-06-04 10:51:39.000000000 +0200
@@ -15,7 +15,7 @@
for f in "$DIR" "$DIR".d/* ; do
if [ -f "$f" ]; then
for p in $(< "$f") ; do
- [[ "$NEWPATH" = *(*:)${p}*(:*) ]] && continue
+ egrep -q "(^|${SEP})${p}($|${SEP})" <<<"$NEWPATH" && continue
[ ! -z "$NEWPATH" ] && SEP=":"
You can’t perform that action at this time.