Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / curl.sh
Created January 18, 2014 06:06
Proof that I'm not the @MaxMartinPDX troll
curl --get 'https://api.twitter.com/1.1/users/show.json' --data 'screen_name=MaxMartinPDX'
@jeffweiss
jeffweiss / gist:6057646
Last active December 20, 2015 02:39
Recently updated gems that don't specify a license
require 'gems'
require 'pp'
pp Gems.latest.map {|g| g["name"]}.
sort.
map {|n| {n => Gems.versions(n) } }.
reject {|elem| elem.has_value? "This rubygem could not be found."}.
map {|elem| {elem.keys.first => elem.values.first.all? {|h| h["licenses"].empty?}}}.
reject {|h| h.has_value? false}
@jeffweiss
jeffweiss / fetchgems.rb
Last active December 16, 2015 16:29
If bundler had a `fetch` command
require 'bundler'
require 'rubygems'
require 'rubygems/gem_runner'
require 'fileutils'
without = [:development, :test]
runner = Gem::GemRunner.new
definition = Bundler::Definition.build('Gemfile', 'Gemfile.lock', nil)
resolver = definition.resolve
@jeffweiss
jeffweiss / gist:5249169
Last active December 15, 2015 10:58 — forked from ploubser/gist:5213863
require 'facter/lsb'
f = File.open('/tmp/file', 'a')
Facter.add(:operatingsystem) do
confine :kernel => :sunos
setcode do "Solaris" end
end
Facter.add(:operatingsystem) do
confine :kernel => :linux
@jeffweiss
jeffweiss / diffstats.html
Last active December 11, 2015 22:58
Commit Calendar View Incantation
<!DOCTYPE html>
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="colorbrewer.css"/>
<style>
body {
font: 10px sans-serif;
shape-rendering: crispEdges;
}
{
"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",
@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',
}
}