Skip to content

Instantly share code, notes, and snippets.

View blackwatertepes's full-sized avatar
Relaxing

Tyler J. Kuhn blackwatertepes

Relaxing
View GitHub Profile
@blackwatertepes
blackwatertepes / jeopardy.txt
Created March 15, 2013 19:32
A super long list of jeopardy questions
This file has been truncated, but you can view the full file.
3288-45 20002 IF THEY WERE SUPERHEROES (Alex: All of the correct responses will end in the letters "M-A-N"; example: Superman.) This 1940s Chicago Bears quarterback would have won games with incredible good fortune (Sid) Luckman 1600 $600
3264-50 20003 THE MEDIA ON TV This title character was the crusty and tough city editor of the Los Angeles Tribune Lou Grant 1800 $800
3032-28 20004 CYBER LIFE Mojo Nixon and the Rev. Horton Heat provided music for this CD-ROM game set in an Arkansas trailer park Redneck Rampage 500 $500
3329-2 20005 THERE GOES THE EMPIRE This nation colonized part of Somalia in the 19th century and invaded Ethiopia in the 20th Italy 100 $100
3279-3 20006 300 YEARS AGO In 1698, this comet discoverer took a ship called the Paramour Pink on the first purely scientific sea voyage Edmund Halley 100 $100
3109-31 20007 FILM BIOGRAPHIES In a 1992 film Jack Nicholson portrayed this labor leader Jimmy Hoffa 1200 $200
4973-40 20008 BEASTLY LIT 1930:Bird is the word for Dashiell Hammett in
@blackwatertepes
blackwatertepes / main.go.tmp
Last active April 22, 2022 19:20
Search Units - Code Templates
// FINISH ME
type Unit struct {
Id int
Location Location
UserRating float64
PriceInCents int
}
type Location struct {
Lat float64
@blackwatertepes
blackwatertepes / render_images_bookmarketlet.js
Last active November 24, 2019 22:50
Render Images from Circle CI Artifacts
/*
ONE_LINER: Creates images from URL's in the Circle CI Artirfacts tab!
FULL_DESCRIPTION:
1. Turns '.png' url's in the Circle CI Artifacts tab into viewable images
a. Organizes the images into sections, based off of their test file names
b. Renders the images with spacing, and outlines based off of their test names
- Example: [beforeEach, some named screenshot, some other named screenshot, afterEach]
c. Adds buttons to scale up/down the images for individual sections
2. Acts as a bookmarket for your Circle CI project

Keybase proof

I hereby claim:

  • I am blackwatertepes on github.
  • I am blackwatertepes (https://keybase.io/blackwatertepes) on keybase.
  • I have a public key ASCUEUtpiGL0EKIk0ISBbX7dobGZ5ghFaCA6vOfQ2CNrDAo

To claim this, I am signing this object:

Introduction

Scripts in this repo...

  • eos.js (Includes the eosjs lib, and sets the basic configuration. Do not run this directly)
  • tail.js (Logs the EOS node transactions. Start this first, in its own window)
  • new_account.js (Creates a new account)

Getting Started

  • Replace the httpEndpoint in eos.js with your EOS node http address
  • Replace the private/public keys in the new_account.js file with your eosio account keys
  • Run tail.js to view transactions
@blackwatertepes
blackwatertepes / gist:8328340
Created January 9, 2014 02:18
Massive Query
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT(sv.value) FROM signal_processor_signal_values AS sv WHERE sv.item_id = si' at line 1: SELECT `signal_processor_items`.`id` AS t0_r0, `signal_processor_items`.`processor_id` AS t0_r1, `signal_processor_items`.`created_at` AS t0_r2, `signal_processor_items`.`updated_at` AS t0_r3, `signal_processor_items`.`default` AS t0_r4, `signal_processor_items`.`paused` AS t0_r5, `signal_processor_signal_values`.`id` AS t1_r0, `signal_processor_signal_values`.`signal_id` AS t1_r1, `signal_processor_signal_values`.`value` AS t1_r2, `signal_processor_signal_values`.`created_at` AS t1_r3, `signal_processor_signal_values`.`updated_at` AS t1_r4, `signal_processor_signal_values`.`lat` AS t1_r5, `signal_processor_signal_values`.`lng` AS t1_r6, `signal_processor_signal_values`.`begin_at` AS t1_r7, `signal_processor_signal_values`.`end_at` AS t1_r8, `signal_processor_signal_valu
@blackwatertepes
blackwatertepes / gist:8186711
Created December 30, 2013 19:23
Git Strangeness
[preproduction][~] git log
commit 61cec4a71dbea09af2b4c8072216adfa2d8bcc4c
Author: Tyler J. Kuhn <tyler@wargoats.com>
Date: Fri Dec 6 11:51:09 2013 -0800
if notes have no body, they get deleted
[preproduction][~] git status
# On branch preproduction
nothing to commit, working directory clean
[preproduction][~] git pull --rebase origin preproduction
@blackwatertepes
blackwatertepes / shortest_distance.rb
Created May 2, 2013 16:02
Shortest Driver Distance (Lyft)
require 'rspec'
module Trip
def distance(a, b)
lat_dist = (a[:lat] - b[:lat]).abs
long_dist = (a[:long] - b[:long]).abs
Math.sqrt(lat_dist**2 + long_dist**2)
end
def route_distance(*points)
=begin
INCOMPLETE: I realized last night (as I tried to not think about coding), how to fix at least the issue with the previous iteration. This one works partially, it just doesn't account for capitalization, punctuation, and
common words (the, of, etc.)
=end
def words_in_a_file (source_text, number)
file_as_a_string = File.open(source_text).read
word_count = Hash.new(0)
array_of_text = file_as_a_string.split
array_of_text.each do |word|