Skip to content

Instantly share code, notes, and snippets.

View knksmith57's full-sized avatar

Kyle Smith knksmith57

View GitHub Profile
#!/usr/bin/env sh
## sandwiches 1 file (slice.v) into another (d_ff.v) _before_ regex /endmodule/
echo -e "`sed -n '/endmodule/,$!p' d_ff.v`\n`<slice.v`\n`sed -n '/endmodule/,$p' d_ff.v`"
Hey {{name of recruiter}},
Thanks for reaching out regarding potential career opportunities with {{company}}!
I appreciate the offer and wish you well on your quest to find good talent. Unfortunately, I’ll have to respectfully decline.
Part of my job as a young professional is knowing my own worth and, on principle, I can’t pursue a lead for a tech company with a recruitment email written in Comic Sans.
All the best!
-{{your name}}
@knksmith57
knksmith57 / README.md
Created February 8, 2014 18:32
Host blocking functions for /etc/hosts -- for when you need to get shit done

Host blocking -- For when you need to get shit done

Chill drop-in functions for your .zshrc to make blocking sites quick and easy.

Simply concats the host(s) you say to /etc/hosts with a redirect to 127.0.0.1-- shit ain't original.

#!/usr/bin/env ruby
temp = 'some-temp-file-that-doesnt-exist'
args = ARGV.shuffle!
last = args.last
cur = args.shift
unless !cur.nil?
# need to provide some args!
var http = require('http');
var sys = require('sys');
var exec = require('child_process').exec;
var util = require('util');
var fs = require('fs');
http.createServer(function(request, response) {
var dummyContent = '<!doctype html><html><head><title>Test</title><meta charset="utf-8"></head><body><p>Hello world!</p></body></html>';
var htmlFileName = "page.html", pdfFileName = "page.pdf";
@knksmith57
knksmith57 / domainr.sh
Created February 14, 2013 02:39
domainr shell script
#!/usr/bin/env ruby
# encoding: utf-8
# From @jerodsanto
# http://blog.jerodsanto.net/2012/11/a-domainr-cli-in-less-than-15-lines-of-ruby/
%w(json open-uri).each { |lib| require lib }
abort "Usage: #{File.basename __FILE__} [query]" unless ARGV.first
response = open("http://domai.nr/api/json/search?q=#{ARGV.first}").read