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
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
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 {
startingLine
endingLine
age
@davidcelis
davidcelis / README.md
Last active Apr 18, 2016
I have a jpg in me
View README.md

I have a JPG

View gist:b4bd67e9e7c0523b61d5256612844744
$ ghi -vv show 273 -- stephencelis/ghi
===> GET /repos/stephencelis/ghi/issues/273
<=== 200: {
"url": "https://api.github.com/repos/stephencelis/ghi/issues/273",
"repository_url": "https://api.github.com/repos/stephencelis/ghi",
"labels_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/labels{/name}",
"comments_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/comments",
"events_url": "https://api.github.com/repos/stephencelis/ghi/issues/273/events",
"html_url": "https://github.com/stephencelis/ghi/issues/273",
"id": 129930467,
View brew_config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 6db36f608fcb534a119ea229b33a95daae61ee6f
Last commit: 20 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.11.2-x86_64
@davidcelis
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)
end
rescue Interrupt
puts "Exiting."
end
end
@davidcelis
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
end
View docker-api-attach-stream-test.rb
require 'docker'
container = Docker::Container.create(
'Image' => 'ubuntu:14.04',
'Cmd' => [
'/bin/bash',
'-c',
'for i in {1..10}; do echo $i; sleep 1; done'
]
)
View HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello from Java");
}
}
You can’t perform that action at this time.