Skip to content

Instantly share code, notes, and snippets.

View underhilllabs's full-sized avatar

Bart Lantz underhilllabs

View GitHub Profile
@underhilllabs
underhilllabs / something.sql
Created April 5, 2018 16:17
find 10 largest tables in a Mysql database
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;
@underhilllabs
underhilllabs / fizzbuzz.rb
Created January 16, 2018 20:20
fizzbuzz ruby
1.upto(100).each do |n|
print "fizz" if n % 3 == 0
print "buzz" if n % 5 == 0
print n if (n % 3 != 0 && n % 5 != 0)
end
@underhilllabs
underhilllabs / Capybara.md
Created January 9, 2018 14:14 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@underhilllabs
underhilllabs / headers.go
Created December 11, 2017 19:19
a simple go program to print the headers from a URL
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
if len(os.Args) < 2 {

Solr Search Query

Field Query: (fq)

tm_relation_sponsored_by_node$field_last_name:lundberg

Fields to return: (fl)

tm_title, tm_field_bill_number, tm_relation_sponsored_by_node$field_last_name

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@underhilllabs
underhilllabs / tmai-engineers.txt
Created April 29, 2017 05:15
Engineers TM AI game
size:
13,9,false
landscape:
U,S,G,B,Y,Y,Y,Y,R,G,B,R,K,
Y,I,I,Y,B,I,I,Y,K,I,I,Y,N,
I,I,B,I,B,I,G,I,G,I,S,I,I,
G,B,Y,I,I,R,B,I,S,I,S,U,N,
K,Y,Y,B,B,B,S,Y,I,I,S,K,B,
Y,B,I,I,Y,Y,I,I,I,K,S,K,N,
@underhilllabs
underhilllabs / argus-security.md
Created April 4, 2017 02:44
Weyland Argus, Security for a Boom Town
@underhilllabs
underhilllabs / tm-darklings-5p-win.txt
Created March 24, 2017 00:20
5p Darkling win 163pts
size:
13,9,true
landscape:
U,I,Y,Y,Y,I,G,G,U,U,U,K,N,
G,Y,I,Y,Y,Y,I,I,I,U,U,K,S,
G,K,I,I,I,U,G,Y,I,I,I,I,N,
Y,G,Y,Y,K,I,G,Y,Y,I,G,K,G,
I,I,U,I,I,R,G,G,G,I,U,K,N,
G,R,I,I,G,I,I,I,U,R,I,U,K,
@underhilllabs
underhilllabs / tm-darklings-4p-win.txt
Created March 21, 2017 02:56
Darklings win 4 player
size:
13,9,false
landscape:
U,U,U,U,Y,Y,Y,K,G,G,B,R,K,
Y,I,I,U,U,I,I,Y,G,I,I,Y,N,
I,I,K,I,U,I,G,I,G,I,S,I,I,
G,Y,Y,I,I,U,G,I,G,I,R,K,N,
K,Y,Y,Y,U,U,G,Y,I,I,K,K,K,
Y,Y,I,I,Y,G,I,I,I,K,S,K,N,