Skip to content

Instantly share code, notes, and snippets.

View akatz's full-sized avatar

Avrohom Katz akatz

  • ShopKeep POS
  • Brooklyn, NY
View GitHub Profile
@akatz
akatz / masq.sh
Created July 5, 2018 20:59 — forked from mowings/masq.sh
script to get xet xhyve working with all vpn interfaces
#!/bin/bash
interfaces=( $(netstat -in | egrep 'utun\d .*\d+\.\d+\.\d+\.\d+' | cut -d ' ' -f 1) )
rulefile="rules.tmp"
echo "" > $rulefile
sudo pfctl -a com.apple/tun -F nat
for i in "${interfaces[@]}"
do
RULE="nat on ${i} proto {tcp, udp, icmp} from 192.168.64.0/24 to any -> ${i}"
echo $RULE >> $rulefile
done
@akatz
akatz / gist:6518450
Last active December 22, 2015 19:19 — forked from byronwade/gist:6518000
<!--/*****************************************************************************/
/*** Blog 1.0 by Byron Wade */
/*** www.thorbis.com | bcw1995@gmail.com */
/*** Follow Me On Twitter At @Thorbis */
/*** NO modifications of this script can be done without consulting me first! */
/*******************************************************************************-->
<!DOCTYPE html>
<html>
<head>
require 'set'
module Dependencies
class Dependencies
def initialize
@graph = Hash.new([])
end
def add_direct(dependent, dependencies)
@graph[dependent] += dependencies
@akatz
akatz / prefill.js
Created February 2, 2012 19:17 — forked from jamesarosen/prefill.js
Pre-fill custom fields in Zendesk
jQuery(function($) {
var customFieldParam = /^ticket\[fields\]\[(\d+)\]$/,
urlParams = $.queryParameters(),
k, match, fieldID;
// for each URL parameter:
for (k in urlParams) {
if (urlParams.hasOwnProperty(k)) {
// check whether it's a Zendesk custom field
@akatz
akatz / comment_permalink.js
Created June 8, 2011 18:31 — forked from jakeisonline/comment_permalink.js
Adds a permalink to all Zendesk comments, and scrolls to them when linked to
http://stackoverflow.com/questions/6024064/devise-error-when-signing-up
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
rake aborted!
Don't know how to build task ':best_referral'
(See full trace by running task with --trace)
(in /app)
new-computers-computer:signup newcomputer$ heroku rake :best_referral --trace
rake aborted!
Don't know how to build task ':best_referral'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
=== Epic Snow Leopard Upgrayyyyd Guide ===
Son, you’re now living in the land of 64-bit systems.
That means that some of your 32-bit shit is now broken.
Not all is lost.
== Fixing MySQL weirdness