Skip to content

Instantly share code, notes, and snippets.

View alexg0's full-sized avatar

Alexander Goldstein alexg0

  • Eligo Energy, LLC
  • Miami, FL
View GitHub Profile
@alexg0
alexg0 / auto_sudo_via_watch_and_tid.sh
Last active February 2, 2022 13:04 — forked from carlosonunez/auto_sudo_via_watch_and_tid.sh
Enable support for sudo via Apple Watch and Touch ID
#! /bin/bash
APPLE_WATCH_PAMID_LIBPATH=/usr/local/lib/pam/pam_watchid.so.2
APPLE_WATCH_PAMID_URL=https://github.com/msanders/pam-watchid
APPLE_WATCH_PAMID_PATH=$HOME/src/pamid-applewatch
enable_sudo_with_apple_watch_and_touch_id() {
trap 'popd' EXIT INT HUP
enable_apple_watch() {
if ! test -f $APPLE_WATCH_PAMID_LIBPATH
@alexg0
alexg0 / node.rb
Created February 25, 2011 20:31 — forked from superfeedr/node.rb
require 'nokogiri'
module Nokogiri
module XML
class Node
##
# Returns true of the argument is semantically equivalent to self
# Equivalent is defined as follows :
# - same name
# build chef
echo 'Acquire::http { Proxy "http://rocky:3142"; } ;' | sudo tee /etc/apt/apt.conf.d/02proxy
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb zlib1g-dev libxml2-dev
sudo gem sources -a http://gems.opscode.com
sudo gem install cucumber merb-core jeweler uuidtools json libxml-ruby --no-ri --no-rdoc
@alexg0
alexg0 / mongo_template.rb
Created November 28, 2009 14:57 — forked from bawNg/mongo_template.rb
mongo_template.rb
# mongo_template.rb
# fork of a fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
#
# To use:
# rails project_name -m template.file
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"