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 / outlook2ringcentral.rb
Last active February 7, 2016 16:20
converts Outlook style dump of contacts (only tested with Google) into format suitable for importing into RingCentral.
#! /usr/bin/env ruby
# Copyright (c) 2016, Alexander Goldstein
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF

Keybase proof

I hereby claim:

  • I am alexg0 on github.
  • I am alexg0 (https://keybase.io/alexg0) on keybase.
  • I have a public key ASCGqvHNgpLgzSv7vuHciExPTTigv9MZuMLRcjw6Z-VSWAo

To claim this, I am signing this object:

@alexg0
alexg0 / gist:7394549
Created November 10, 2013 06:21
Airmail Beta 1.3 (214) crash
Process: AirMail Beta [17994]
Path: /opt/homebrew-cask/*/AirMail Beta.app/Contents/MacOS/AirMail Beta
Identifier: it.bloop.airmail.beta8
Version: 1.3 (214)
Code Type: X86-64 (Native)
Parent Process: launchd [334]
Responsible: AirMail Beta [17994]
User ID: 501
Date/Time: 2013-11-10 00:20:27.527 -0600
@alexg0
alexg0 / .slate
Last active December 26, 2015 14:19
#! slate
# install with following command:
# cd /Applications && curl http://www.ninjamonkeysoftware.com/slate/versions/slate-latest.tar.gz | tar -xz
# GLOBAL CONFIGURATIONS
# -------------------------------------------------------------------
# See https://github.com/jigish/slate/wiki/Global-Configs
config defaultToCurrentScreen true
@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
# standard rails .gitignore file
# .gitignore
# bundler recomended lines
vendor/gems/*
!vendor/gems/cache/
.bundle/
# generated tags
tags
# Generate tags
require 'rubygems'
module Tags
# TODO: add gem dirs
RUBY_DIRS = %w( lib vendor/gems )
GEM_PATHS = Gem.path
def ruby_paths
(RUBY_DIRS + GEM_PATHS).find_all{|d| File.exists? d }
@alexg0
alexg0 / Rakefile
Created April 16, 2010 18:02
for chef-repo - load and dump data bags
# ...
# append following lines
Dir[ File.join(File.dirname(__FILE__), 'tasks', '*.rake') ].sort.each do |f|
load f
end
# 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