Skip to content

Instantly share code, notes, and snippets.

jamesgecko /
Created May 6, 2021
How to share a git repo with multiple users on the same system
# Read this for more info:
chmod -R ugo+rw repo-folder
chmod -R a+X repo-folder
cd repo-folder
git config --local core.fileMode false
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
unzip ./
cd ./RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/
tar -xvf ./rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105.tar.gz
cd ./rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/
patch -p1 < ../../../rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105_patch.txt
make install
insmod ./8192cu.ko
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 /
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()
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