Skip to content

Instantly share code, notes, and snippets.

View darthschmoo's full-sized avatar

Bryce Anderson darthschmoo

View GitHub Profile
@darthschmoo
darthschmoo / fun_with_files.download.txt
Created August 14, 2020 16:24
A file for FunWith::Files to pull off the Internet while it's testing the download functionality
You have successfully downloaded a file. Huzzah!
@darthschmoo
darthschmoo / title_generator.rb
Last active May 15, 2020 18:10
Ruby Random Epic Fantasy Title Generator, Take II
#!/usr/bin/env ruby
# TODOS: move lists into configuration file, plurals, better finding/replacing of variables
class LineParser
def without_comments( line )
line.gsub( /#.*/, "" )
end
end
class ListParser < LineParser
# TODOS: move lists into configuration file, plurals, better finding/replacing of variables
# Not using
class Pluralizer
def initialize
@pluralize = {}
p "ash", "ashes"
p "fox", "foxes"
p "wolf", "wolves"
p "thief", "thieves"
# returns the two boxes ["G", "G"], ["G", "S"] (equal odds for every order)
def get_boxes
dice_roll = rand()
if dice_roll < 0.25
[["G", "G"], ["G", "S"]]
elsif dice_roll < 0.5
[["G", "G"], ["S", "G"]]
elsif dice_roll < 0.75
<!DOCTYPE html>
<html>
<head>
<title> example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
<!DOCTYPE html>
<html>
<head>
<title> example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
<!DOCTYPE html>
<html>
<head>
<title> example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
<!DOCTYPE html>
<html>
<head>
<title> example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;

Keybase proof

I hereby claim:

  • I am darthschmoo on github.
  • I am darth_schmoo (https://keybase.io/darth_schmoo) on keybase.
  • I have a public key whose fingerprint is 8996 1066 CA78 3E67 78E8 9D75 512B E81A 8D94 CA49

To claim this, I am signing this object:

@darthschmoo
darthschmoo / gist:8359447
Created January 10, 2014 18:09
Ruby code: If anyone needs help generating their Amazon AuthorRank for the day.
module ChuckWendig
class AuthorRankGenerator
def initialize
@mood = %w(belated confused morose unwell insipid thoughtful incontinent chewy bratty arrogant untrustworthy
awestruck inebriated love-starved overwrought merciful doubtful analytical self-assured simplistic
enraged melancholy lustful depressed)
@descriptor = %w(fighting dancing stammering boiling endearing staggered judicious internal heat-loving
ragtime kleptomaniacal torrential climate-changing self-help razor-edged killer caffeinated
pugilistic bitcoin luddite libertarian progressive leftist right-wing patriotic unpatriotic