Skip to content

Instantly share code, notes, and snippets.

View doolin's full-sized avatar

Dave Doolin doolin

View GitHub Profile
@doolin
doolin / colortest
Created August 25, 2012 00:51 — forked from BinaryMuse/colortest
perl based color test for your terminal
#!/usr/bin/perl
# by entheon, do whatever the hell you want with this file
print "\n";
print "**************************\n";
print "*XTERM 256Color Test Chart\n";
print "**************************\n";
print "* 16 = black\n";
print "* 255 = white\n";
@doolin
doolin / colortest.pl
Created June 30, 2013 15:58
colortest.pl file found somewhere on the web.
#!/usr/bin/perl
# by entheon, do whatever the hell you want with this file
print "\n";
print "**************************\n";
print "*XTERM 256Color Test Chart\n";
print "**************************\n";
print "* 16 = black\n";
print "* 255 = white\n";
@doolin
doolin / Xresult
Created October 2, 2013 23:19 — forked from amatsuda/Xresult
% rspec spec/models/user_spec.rb
.F.F.
Failures:
1) User
Failure/Error: it { should query :where => {:name => 'bar'} }
expected [:where] to query {:where=>{:name=>"bar"}}
# ./spec/models/user_spec.rb:6
/* compile with g++ ip.c++ -lboost_system */
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>
using namespace boost::numeric::ublas;
class Perceptron {
public:

Keybase proof

I hereby claim:

  • I am doolin on github.
  • I am doolin (https://keybase.io/doolin) on keybase.
  • I have a public key whose fingerprint is 24A8 C0E3 FF55 41ED 1AE8 3879 EF64 51F2 B483 07C2

To claim this, I am signing this object:

#!/usr/bin/env ruby
# invoke with ./generated_example.rb -f d
require 'rspec/autorun'
public
def solution(args)
# code here
end

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@doolin
doolin / pre-push.sh
Created July 24, 2019 21:07 — forked from kirkelifson/pre-push.sh
good git hooks for rails
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
print_fuck() {
echo "${RED}"
echo " β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–ˆ β–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆ β–„β–ˆβ–€"
echo "β–“β–ˆβ–ˆ β–’ β–ˆβ–ˆ β–“β–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–€ β–€β–ˆ β–ˆβ–ˆβ–„β–ˆβ–’ "
echo "β–’β–ˆβ–ˆβ–ˆβ–ˆ β–‘β–“β–ˆβ–ˆ β–’β–ˆβ–ˆβ–‘β–’β–“β–ˆ β–„ β–“β–ˆβ–ˆβ–ˆβ–„β–‘ "
echo "β–‘β–“β–ˆβ–’ β–‘β–“β–“β–ˆ β–‘β–ˆβ–ˆβ–‘β–’β–“β–“β–„ β–„β–ˆβ–ˆβ–’β–“β–ˆβ–ˆ β–ˆβ–„ "
@doolin
doolin / git_abbr.fish
Created August 6, 2019 15:02 — forked from jdiaz5513/git_abbr.fish
Git Abbreviations for Fish
abbr -a -U -- ga 'git add'
abbr -a -U -- gaa 'git add --all'
abbr -a -U -- gbd 'git branch -d'
abbr -a -U -- gbl 'git branch -l'
abbr -a -U -- gbm 'git branch -m'
abbr -a -U -- gc 'git commit'
abbr -a -U -- gc! 'git commit --amend'
abbr -a -U -- gcam 'git commit --all -m'
abbr -a -U -- gcan! 'git commit --all --no-edit --amend'
abbr -a -U -- gcb 'git checkout -b'
require 'openssl'
require 'base64'
require 'json'
require 'rspec/autorun'
# Example taken from https://en.wikipedia.org/wiki/JSON_Web_Token
class JwtAuth
SECRET = ENV['JWT_TEST_SECRET'] || 'secretkey'
def header