Skip to content

Instantly share code, notes, and snippets.

Howdy. I'm the sheriff of statuses.

David Celis davidcelis

Howdy. I'm the sheriff of statuses.
Block or report user

Report or block davidcelis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
davidcelis /
Last active Nov 16, 2019
Watch for changes in a slow monorepo and update a `git status` cache for your prompt to read from 😬

A git prompt hack for the impatient amongst us

Maybe you have a big ol' monorepo, and git operations are pretty slow in it. For those of us who like to show information about the repository's dirty status in our prompt, that means a slow prompt. Waiting 1s every time you hit the return key can really add up! Instead of just giving up and eschewing the dirty status entirely, why not just cache it in the background have your prompt read from the cache?


First, install fswatch:

brew install fswatch
davidcelis / ariake-dark.js
Created May 25, 2019
A port of the Ariake Dark theme for Blink shell.
View ariake-dark.js
black = '#2a2d37';
red = '#85b1e0';
green = '#9aefea';
yellow = '#dda2f6';
blue = '#f5faff';
magenta = '#7e7edd';
cyan = '#4d8acb';
white = '#b9bed5';
lightBlack = '#2a2d37';
View results.txt
user system total real
Forwardable 0.170000 0.000000 0.170000 ( 0.167711)
Send 0.110000 0.000000 0.110000 ( 0.106545)
Simple call 0.070000 0.000000 0.070000 ( 0.070068)
davidcelis / blame.graphql
Created Dec 6, 2016
An example GraphQL query to get `git blame` data from the GitHub GraphQL API
View blame.graphql
query {
repositoryOwner(login: "github") {
repository(name: "linguist") {
object(expression: "master") {
... on Commit {
blame(path: "github-linguist.gemspec") {
ranges {
davidcelis /
Last active Apr 18, 2016
I have a jpg in me

I have a JPG

View gist:b4bd67e9e7c0523b61d5256612844744
$ ghi -vv show 273 -- stephencelis/ghi
===> GET /repos/stephencelis/ghi/issues/273
<=== 200: {
"url": "",
"repository_url": "",
"labels_url": "{/name}",
"comments_url": "",
"events_url": "",
"html_url": "",
"id": 129930467,
View brew_config
HEAD: 6db36f608fcb534a119ea229b33a95daae61ee6f
Last commit: 20 minutes ago
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.11.2-x86_64
davidcelis / metronome.rb
Last active Mar 15, 2018
A simple metronome in Ruby
View metronome.rb
class Metronome
def self.start(bpm: 120)
loop do
print "\a"
sleep (60 / bpm.to_f)
rescue Interrupt
puts "Exiting."
davidcelis / bad.rb
Last active Aug 29, 2015
Stop Validating Email Addresses With Regex
View bad.rb
class User < ActiveRecord::Base
validates_format_of :email, :with => /^(|(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6})$/i
View docker-api-attach-stream-test.rb
require 'docker'
container = Docker::Container.create(
'Image' => 'ubuntu:14.04',
'Cmd' => [
'for i in {1..10}; do echo $i; sleep 1; done'
You can’t perform that action at this time.