Skip to content

Instantly share code, notes, and snippets.

View dillonkearns's full-sized avatar
🌳

Dillon Kearns dillonkearns

🌳
View GitHub Profile
@dillonkearns
dillonkearns / Main.elm
Last active February 10, 2026 18:14
elm-pages script: Render Markdown to ANSI terminal output using dillonkearns/elm-markdown and wolfadex/elm-ansi
module Main exposing (run)
import Ansi.Color
import Ansi.Font
import BackendTask exposing (BackendTask)
import BackendTask.File as File
import Cli.Option as Option
import Cli.OptionsParser as OptionsParser
import Cli.Program as Program
import FatalError exposing (FatalError)
@dillonkearns
dillonkearns / staticgen-archive.json
Created September 28, 2019 20:10
STATICGEN.COM DATA ARCHIVE
{"timestamp":1569701285130,"data":{"ace":[{"timestamp":1569701285130,"stars":36,"forks":6,"issues":0,"repo":"https://github.com/botanicus/ace"}],"acrylamid":[{"timestamp":1569701285130,"stars":288,"forks":42,"issues":45,"repo":"https://github.com/posativ/acrylamid"}],"adm-dev-kit":[{"timestamp":1569701285130,"stars":29,"forks":4,"issues":11,"repo":"https://github.com/iamfrntdv/adm-dev-kit"}],"amsf":[{"timestamp":1569701285130,"stars":230,"forks":139,"issues":2,"repo":"https://github.com/sparanoid/almace-scaffolding"}],"anodize":[{"timestamp":1569701285130,"stars":4,"forks":0,"issues":0,"repo":"https://github.com/sidmani/anodize"}],"antora":[{"timestamp":1569701285130,"followers":602,"stars":199,"forks":67,"issues":129,"repo":"https://gitlab.com/antora/antora"}],"antwar":[{"timestamp":1569701285130,"stars":458,"forks":32,"issues":7,"repo":"https://github.com/antwarjs/antwar"}],"asimov-static":[{"timestamp":1569701285130,"stars":4,"forks":3,"issues":0,"repo":"https://github.com/adamrenklint/asimov-static"}],"as
@dillonkearns
dillonkearns / mob-coding-challenge.js
Last active April 24, 2017 04:43
A saved mob programming session with Learn Teach Code!
// Type JavaScript here!
function numbersToNegatives(numbersArray) {
let negativeNumbers = []
for (let i = 0; i < numbersArray.length; i++) {
negativeNumbers.push(numberToNegative(numbersArray[i]))
}
return negativeNumbers
}
class TicTacToeGame
def initialize
@board = Array.new(3) { Array.new(3) }
end
def to_s
board_string = ""
@board.each do |row|
@dillonkearns
dillonkearns / numeral.rb
Created October 14, 2015 23:35
Roman Numeral Kata Result
class Numeral
CONVERSIONS = {
100 => 'C',
90 => 'X',
10 => 'X',
5 => 'V',
4 => 'IV',
1 => 'I',
}
# ------------------------------------------------------------------------
# Based on Juan G. Hurtado oh-my-zsh theme
# (Needs Git plugin for current_branch method)
# ------------------------------------------------------------------------
# save this under .oh-my-zsh/themes/dillon.zsh-theme
# then, in your .zshrc, replace the line:
# ZSH_THEME="robbyrussell"
# with:
# ZSH_THEME="dillon"
@dillonkearns
dillonkearns / backbone-demo.coffee
Created April 3, 2012 02:05
Demo of Backbone.js and Coffeescript
class DriversLicenseModel extends Backbone.Model
class DriversLicenseView extends Backbone.View
initialize: ->
@model.on('change', @somethingChanged, @)
somethingChanged: (something) ->
@render()
Feature: Show captcha
Scenario: User enters wrong password 3 times
Given the user enters the wrong password 3 times
Then a captcha should be displayed
Scenario: User enters wrong password 2 times, then enters right one
Given the user enters the wrong password 2 times
But the user enters the right password 1 time
Then a captcha should NOT be displayed
Given /^the user enters the (right|wrong) password (\d+) times?$/ do |right_or_wrong, num_tries|
num_tries.to_i.times do
puts "Entering %s password" % right_or_wrong
end
end
Then /^a captcha should( NOT|) be displayed$/ do |is_displayed|
#pending("How do we check if captcha is displayed?")
true.should == false
if is_displayed =~ /NOT/