Skip to content

Instantly share code, notes, and snippets.

View KelseyDH's full-sized avatar

Kelsey Hannan KelseyDH

  • Bite Interactive
  • Vancouver
View GitHub Profile
@KelseyDH
KelseyDH / twitterblue-nerd.js
Last active November 10, 2022 05:47 — forked from busybox11/twitterblue-nerd.js
create a safe path for using this script
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.2.0
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/KelseyDH/7478e6fea882a5a685ededdebf0d51ea/raw/76eedc195d471add755e84c71bf92126908b1629/twitterblue-nerd.js
// @downloadURL https://gist.githubusercontent.com/KelseyDH/7478e6fea882a5a685ededdebf0d51ea/raw/76eedc195d471add755e84c71bf92126908b1629/twitterblue-nerd.js
@KelseyDH
KelseyDH / README.md
Created May 19, 2021 03:06 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@KelseyDH
KelseyDH / local-dnsserver.md
Created February 4, 2020 20:30 — forked from nsbingham/local-dnsserver.md
Testing a CNAME

Setting up a local DNS server with bind on OSX Mavericks

This is really just an approach for locally testing DNS changes, which can easily be done with a HOSTS file if the change involves an IP address, but gets a bit trickier when things like CNAMEs are involved. This is only meant to test locally off a single machine.

  1. Install bind using homebrew

    brew install bind

  2. Follow the installation steps to start up bind

@KelseyDH
KelseyDH / osx_setup.sh
Created January 14, 2020 19:30 — forked from dannysmith/osx_setup.sh
Sensible defaults for New Mac
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@KelseyDH
KelseyDH / thread_safe.rb
Created July 18, 2017 22:30 — forked from mikbe/thread_safe.rb
Stops collisions but it's ugly
require 'thread'
module ThreadSafe
def self.included(base)
base.extend(ThreadSafeClassMethods)
base.threadsafe_class_mutex = Mutex.new
end
module ThreadSafeClassMethods
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@KelseyDH
KelseyDH / -
Created November 9, 2015 22:15 — forked from anonymous/-
gicof() {
git co $( (git branch -r | sed 's/origin\///'; git branch) | sort | uniq | fzf --query="$1" --select-1 --exit-0 )
}
gimf() {
git merge $( (git branch -r | sed 's/origin\///'; git branch) | sort | uniq | fzf --query="$1" --select-1 --exit-0 )
}
task :deploy => ['deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
task :migrations => [:push, :off, :migrate, :restart, :on, :tag]
task :rollback => [:off, :push_previous, :restart, :on]
task :push do
puts 'Deploying site to Heroku ...'
puts `git push heroku`
end
def defer(&block)
def block.each ; yield call ; end
block
end
app =
lambda do |env|
status = 200
headers = { 'Last-Modified' => exec_sql('SELECT MAX(updated_at) FROM foos').httpdate }