Skip to content

Instantly share code, notes, and snippets.

jamesgecko / code-climate-dark-mode.css
Last active Jan 23, 2021
CodeClimate extension dark mode
View code-climate-dark-mode.css
@media (prefers-color-scheme: dark) {
.cc-alert {
color: var(--color-scale-black);
.cc-issue-description {
color: var(--color-scale-black);
.cc-ext .cc-issue .ellipsis-expander {
jamesgecko / routes
Created Jul 11, 2019
Faster way to search Rails routes from the CLI
View routes
#! /usr/bin/env ruby
# Setup:
# Put this script in your path and make it executable.
# gem install nokogiri
# Usage:
# $ routes | grep index
require 'rubygems'
jamesgecko / Links in
Last active Dec 21, 2018 — forked from jesstelford/Links in
Putting links in code blocks on GitHub
View Links in
View Copy TargetProcess link
View quiet-mention
#!/usr/bin/env ruby
lookup = {
a: 'a', b: 'b', c: 'c', d: 'd', e: 'e', f: 'f', g: 'g', h: 'h',
i: 'i', j: 'j', k: 'k', l: 'l', m: 'm', n: 'n', o: 'o', p: 'p',
q: 'q', r: 'r', s: 's', t: 't', u: 'u', v: 'v', w: 'w', x: 'x',
y: 'y', z: 'z', A: 'A', B: 'B', C: 'C', D: 'D', E: 'E', F: 'F',
G: 'G', H: 'H', I: 'I', J: 'J', K: 'K', L: 'L', M: 'M', N: 'N',
O: 'O', P: 'P', Q: 'Q', R: 'R', S: 'S', T: 'T', U: 'U', V: 'V',
W: 'W', X: 'X', Y: 'Y', Z: 'Z'
jamesgecko / init.lua
Created Aug 10, 2017
hammerspoon config
View init.lua
-- Tap caps lock for esc, use caps lock with another key for ctrl.
send_escape = false
last_mods = {}
control_key_handler = function()
send_escape = false
control_key_timer =, control_key_handler)
jamesgecko / Vagrantfile
Created Dec 9, 2016
A Vagrantfile suitable for running Rails applications
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
sudo apt-get -y update
sudo apt-get -y install curl git-core python-software-properties ruby-dev libpq-dev build-essential nginx libsqlite3-0 libsqlite3-dev libxml2 libxml2-dev libxslt1-dev nodejs postgresql postgresql-contrib imagemagick autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
git clone ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
jamesgecko / init.lua
Created Nov 1, 2016 — forked from rjhilgefort/init.lua
Hammerspoon config to send escape on short ctrl press
View init.lua
local sendEscape = true
local ctrlKeyTimer =, function()
sendEscape = false
local lastMods = {}
local flagsChangedHandler = function(event)
local newMods = event:getFlags()
if lastMods.ctrl == newMods.ctrl then return false end

Keybase proof

I hereby claim:

  • I am jamesgecko on github.
  • I am jamesgecko ( on keybase.
  • I have a public key ASD4BgjKFTTy4-vz9nmAuD9YjuA9ej80xVJ71J6mM_B3Gwo

To claim this, I am signing this object:

jamesgecko /
Created Sep 9, 2015
Quick Pico-8 image encoder
from PIL import Image
PALETTE = ((0,0,0), (29, 43, 83), (128, 37, 83), (0, 135, 81),
(171,82,54), (95,87,79), (194,195,199), (255,241,232),
(255,0,77), (255,163,0), (255,255,39), (0,231,86),
(41,173,255), (131,118,156), (255,119,168), (255,204,170))
def main():
im ='tilesetP8.png')
px = im.load()