Skip to content

Instantly share code, notes, and snippets.

@jeffweiss
jeffweiss / keybase.md
Created April 7, 2014 18:07
keybase.md

Keybase proof

I hereby claim:

  • I am jeffweiss on github.
  • I am jeffweiss (https://keybase.io/jeffweiss) on keybase.
  • I have a public key whose fingerprint is 0423 A21C FCFF 2A10 E536 F7EA 8C24 30AF 024A C4E9

To claim this, I am signing this object:

@jeffweiss
jeffweiss / address-validation.patch
Created August 6, 2014 17:09
AvaTax Address Validation Documentation Patch
--- address-validation.orig 2014-08-06 10:04:30.000000000 -0700
+++ address-validation 2014-08-06 10:04:46.000000000 -0700
@@ -465,7 +465,7 @@
<p>For production accounts:</p>
<pre class="qoate-code">https://avatax.avalara.net/1.0/address/validate?Line1=PO+Box+123&amp;City=Bainbridge%20Island&amp;Region=WA&amp;PostalCode=98110</pre>
<p>For development accounts:</p>
-<pre class="qoate-code">https://avatax.avalara.net/1.0/address/validate?Line1=PO+Box+123&amp;City=Bainbridge%20Island&amp;Region=WA&amp;PostalCode=98110</pre>
+<pre class="qoate-code">https://development.avalara.net/1.0/address/validate?Line1=PO+Box+123&amp;City=Bainbridge%20Island&amp;Region=WA&amp;PostalCode=98110</pre>
<p>Sample Response Headers (when an error occurs)</p>
<pre class="qoate-code">HTTP/1.1 500 Internal Server Error Date: Thu, 01 Mar 2012 00:24:54 GMT
@jeffweiss
jeffweiss / layout.erb
Created August 15, 2014 20:03
For the ruby learning group
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
@jeffweiss
jeffweiss / Topics
Last active August 29, 2015 14:05
Elixir Demo
1. Clustering
a. Interaction w/ running code without having code
b. Remote process spawning
c. std in/out redirect
2. Supervision Trees
3. Live Code Update
@jeffweiss
jeffweiss / basic_bench.exs
Last active August 29, 2015 14:20
Numbers to words
defmodule BasicBench do
use Benchfella
@num :random.uniform(999_999_999_999)
bench "interpolation" do
@num
|> NumToWordsString.say
end
@jeffweiss
jeffweiss / gist:4027768
Created November 6, 2012 21:40
Live Management stack
Stomp::Error::NoCurrentConnection - no current connection exists:
/opt/puppet/lib/gems/1.8/gems/stomp-1.2.3/lib/stomp/connection.rb:334:in `publish'
/opt/puppet/libexec/mcollective/mcollective/connector/stomp.rb:189:in `send'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:65:in `sendreq'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:64:in `sendreq'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:105:in `discover'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:104:in `discover'
/opt/puppet/lib/site_ruby/1.8/mcollective/rpc/client.rb:331:in `discover'
@jeffweiss
jeffweiss / dev-env-create.sh
Created November 9, 2012 18:13
Dev env bootstrap script
#!/bin/bash
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source $HOME/.rvm/scripts/rvm
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
@jeffweiss
jeffweiss / gist:4157483
Created November 27, 2012 22:09
puppetlabs-auth_conf Example
class my_custom_auth_conf_rule {
include auth_conf
auth_conf::acl { '/my_modified_endpoint':
auth => 'yes',
acl_method => ['find','search'],
allow => 'my_custom_cert_name',
}
}
@jeffweiss
jeffweiss / x10.ex
Created November 4, 2015 22:45
Sample X10 packet (de)composition in Elixir
defmodule X10 do
# all codes referenced from http://www.haibrain.com/informatie-domotica-x10-protocol-c-131_148_141.html?language=en
@house_codes %{
6 => :house_a,
14 => :house_b,
2 => :house_c,
10 => :house_d,
1 => :house_e,
9 => :house_f,
{
"checksums": {
"tests/site.pp": "c094d16be278f045311fafb85d1806e3",
"spec/defines/jenkins_plugin_install_spec.rb": "f7e3588ee424091e05f2fdb1e4be9916",
"spec/classes/jenkins_spec.rb": "08ea3092e7b38375e5e1ab3087236fc0",
"features/deb_support.feature": "14789ecdb4e8ffd58195972969a652ce",
"features/support/boxes/deb/install-puppet-module.sh": "79dda31c04877e19075829f3540d1e31",
"features/support/boxes/deb/verify-jenkins-install": "7ac9d96ae93d0fa83b3343f17a0015bc",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"Rakefile": "aaa0fe1993278f346063b22c15385b3b",