Skip to content

Instantly share code, notes, and snippets.

View kevinthompson's full-sized avatar
🕹️

Kevin Thompson kevinthompson

🕹️
View GitHub Profile
@kevinthompson
kevinthompson / README.md
Last active February 12, 2024 11:35
Tool Script to Create a CollisionPolygon2D from a child Sprite2D in Godot 4
@kevinthompson
kevinthompson / highscore.lua
Last active April 19, 2022 04:05
High Score Library for PICO-8
-- highscore
-- by @kevinthompson
_hs_chars="abcdefghijklmnopqrstuvwxyz "
_hs_max_records=10
_hs_record_bytesize=5
_hs_records={}
_hs_char_index=function(char)
for i=1,#_hs_chars do
-- Platformer Engine
-- by @kevinthompson
-- adapted from @enichan's platformer https://github.com/Enichan/Pico8Platformer
platformer={
config={
logfile="log",
precision=1,
tilesize=8,
@kevinthompson
kevinthompson / solution.rb
Created December 1, 2017 15:42
Advent of Code 2017 - Day 1 Solution
input = File.open('./input.txt').read.strip
class RecursiveString < String
def [](i)
if i >= length
super(i - length)
else
super(i)
end
end
@kevinthompson
kevinthompson / README.md
Last active June 27, 2017 20:29
Script for Displaying Images on #SIGNALconf Interactive Display

Notes

This requires you to have a few things:

  1. A Mac
  2. An iPhone
  3. A US Cell Phone Number
  4. Handoff Enabled on Your Mac/iPhone
  5. A generous text message plan
@kevinthompson
kevinthompson / .env
Last active August 18, 2022 13:39
Litmus Example – Tweets in CSS
TWITTER_CONSUMER_KEY=""
TWITTER_CONSUMER_SECRET=""
TWITTER_SEARCH_STRING="#tedc15 -rt"
@kevinthompson
kevinthompson / gist:695d2cea49435994e485
Created January 21, 2015 07:20
Monitor H1Z1 Servers
require 'open-uri'
require 'json'
##
# Add underscore method to string for simple JSON
# key manipulation.
class String
def underscore
self.gsub(/::/, '/').
@kevinthompson
kevinthompson / example.js.coffee
Created January 17, 2014 23:18
Potential Solution for Page-Specific JavaScript
# ./app/assets/javascripts/app.js.coffee
@App ||= {}
# ./app/assets/javascripts/app/view.js.coffee
class @App.View
@where: (params = { controller: null, action: null }) ->
controller = @_parseClassName(params.controller)
action = @_parseClassName(params.action)
try
@kevinthompson
kevinthompson / SassMeister-input-HTML.haml
Created December 10, 2013 00:50 — forked from chantastic/SassMeister-input-HTML.haml
Generated by SassMeister.com.
%form.comment__form
%button Submit
%form.product__form
%button Submit
@kevinthompson
kevinthompson / SassMeister-input-HTML.haml
Created December 9, 2013 22:41 — forked from chantastic/SassMeister-input-HTML.haml
Generated by SassMeister.com.
/ person listing page
%div#person-list
%div.person
default
%div.person.person--active
active
%div.person.person--pending
pending