Skip to content

Instantly share code, notes, and snippets.

View MattJermyWright's full-sized avatar

Matt Wright MattJermyWright

  • Zahlen Solutions
  • Lindon, UT
View GitHub Profile
@MattJermyWright
MattJermyWright / Vagrantfile
Last active December 31, 2017 14:47
Vertica commonly used SQL
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@MattJermyWright
MattJermyWright / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@MattJermyWright
MattJermyWright / chisquare2x2.R
Created September 18, 2014 17:42
Chi-Square 2x2 Test of Independence - R code
group1Population = 577958
group1Measured = 6015
group2Population = 235568
group2Measured = 2115
data.table = matrix(
c(group1Population,group1Population-group1Measured, # Row 1
group2Population,group2Population-group2Measured), # Row 2
nrow=2, # number of rows
ncol=2, # number of columns
@MattJermyWright
MattJermyWright / recursiveAnonLambdas.go
Created August 2, 2014 20:17
Go Patterns: Common patterns for the Go language.
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
const deltaCorrectionThreshold = .000000000000000005
var NewtonSquareRootRecursive func(float64, float64) float64
@MattJermyWright
MattJermyWright / Basic Python File Reader
Created July 25, 2013 04:23
Basic Python File Reader Skeleton
#!/usr/bin/env python
import re
import sys
from optparse import OptionParser
def main():
commandLine = OptionParser()
commandLine.add_option("-f", "--file", type="string", dest="filename",
help="Read from specific FILE", action="store", metavar="FILE")
@MattJermyWright
MattJermyWright / gist:4957430
Created February 14, 2013 23:44
Applescript that moves any set of Microsoft Outlook 2011 messages to the first iMap account and to a pre-defined folder within that imap account.
tell application "Microsoft Outlook"
set thisAccount to item 1 of imap accounts
set destFolder to folder "Hewlett-Packard"
set messageSet to current messages
repeat with currMsg in messageSet
move currMsg to destFolder
end repeat
end tell
#!/usr/bin/ruby
# Dropzone Destination Info
# Name: GitHub Gist
# Description: Drag text or files to share them instantly via GitHub Gist. Hold down option to make a public Gist. Click to copy and goto the last URL.
# Handles: NSStringPboardType, NSFilenamesPboardType
# Events: Clicked, Dragged
# KeyModifiers: Option
# Creator: Justin Hileman
# URL: http://justinhileman.com