Skip to content

Instantly share code, notes, and snippets.

View simeonwillbanks's full-sized avatar
☀️
😎

Simeon Willbanks simeonwillbanks

☀️
😎
View GitHub Profile
@simeonwillbanks
simeonwillbanks / gist
Created July 26, 2012 17:27
GitHub: Potentially the best command line gister. Version: https://github.com/defunkt/gist/pull/112 & https://github.com/defunkt/gist/pull/108 #github #commandline
#!/usr/bin/env ruby
# encoding: utf-8
#
# This file, gist, is generated code.
# Please DO NOT EDIT or send patches for it.
#
# Please take a look at the source from
# http://github.com/defunkt/gist
# and submit patches against the individual files
# that build gist.
html = '<div id="modal-confirm-dialog" class="modal hide fade in">' +
'<div class="modal-header">' +
'<button type="button" class="close" data-dismiss="modal">&times;</button>' +
'<h3>' + options.title + '</h3>' +
'</div>' +
'<div class="modal-body">' +
'<p>' + options.message + '</p>' +
'</div>' +
'<div class="modal-footer">' +
'<a class="btn btn-primary confirm">' + options.confirm_button_text + '</a>' +
@simeonwillbanks
simeonwillbanks / goroutines2.go
Created January 8, 2013 20:08 — forked from elimisteve/goroutines2.go
Programming Challenge: Launch 4 threads, goroutines, coroutines, or whatever your language uses for concurrency, in addition to the main thread. In the first 3, add numbers together (see sample code below) and pass the results to the 4th thread. That 4th thread should receive the 3 results, add the numbers together, format the results as a strin…
// Steve Phillips / elimisteve
// 2013.01.03
package main
import "fmt"
// intDoubler doubles the given int, then sends it through the given channel
func intDoubler(ch chan int, n int) {
ch <- n*2
@simeonwillbanks
simeonwillbanks / rules.md
Last active December 11, 2015 07:38 — forked from henrik/rules.md
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/ #poodr #ruby #ood #rubyrogues
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done.

You can break these rules if you can talk your pair into agreeing with you.

@simeonwillbanks
simeonwillbanks / gist:4630315
Created January 25, 2013 00:33
A gist without a title, but a language selected.
# hi
@simeonwillbanks
simeonwillbanks / gist:4630341
Created January 25, 2013 00:34
A gist without a title and no language selected.
Hi
@simeonwillbanks
simeonwillbanks / setup-centos-server.markdown
Created February 1, 2013 18:24 — forked from weakish/README.md
setup #centos #server #sysadmin #debian

CentOS server setup guide for people from debian

A basic server setup guide for people from debian to CentOS.

Software

yum is apt-get/aptitude on CentOS.

@simeonwillbanks
simeonwillbanks / gist_fork_of.js
Last active September 8, 2022 00:03
GitHub API discussion - filter associations via url. #api #github
// $ curl -i https://api.github.com/gists/4567703/fork_of
//
// HTTP/1.1 200 OK
// Server: GitHub.com
// Date: Wed, 23 Jan 2013 17:05:28 GMT
// Content-Type: application/json; charset=utf-8
// Connection: keep-alive
// Status: 200 OK
// X-Content-Type-Options: nosniff
// Cache-Control: public, max-age=60, s-maxage=60
# an attempt to identify the commit when hpricot 0.8.3 segfaults
# were introduced.
#
# To be able to use git bisect run, I used fork to run the test-case,
# as otherwise the running process is left in a zombie I don't wanna leave state.
#
# Put this in hpricot source folder (with the Rakefile), then run:
#
# $ git checkout master
# $ git bisect start HEAD 0.8.2
@simeonwillbanks
simeonwillbanks / f.rake
Last active December 15, 2015 14:29
#rake namespace alias
namespace :f do
desc "alias for `rake footasticforsure:dowork`"
task :d
Rake::Task["footasticforsure:dowork"].invoke
end
end