Skip to content

Instantly share code, notes, and snippets.

View dyson's full-sized avatar
🏠
Working from home

Dyson Simmons dyson

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dyson on github.
  • I am dyson (https://keybase.io/dyson) on keybase.
  • I have a public key ASB233PriZ1Sd27caEkNe409FczB9gYHYmYSzqrX6t16sgo

To claim this, I am signing this object:

@dyson
dyson / Makefile
Created April 29, 2017 09:30 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@dyson
dyson / README.md
Created November 29, 2015 12:32 — forked from camillebaldock/README.md
Dashing Statuscake widget

Description

A Dashing widget for displaying the number of websites down according to StatusCake.

See a live demo here.

Usage

Setup the following environment variables:

@dyson
dyson / REAMDE.md
Created November 29, 2015 00:58 — forked from jwalton/REAMDE.md
Pingdom widget for Dashing

Description

Simple Dashing widget (and associated job) to display Pingdom checks.

##Dependencies

rest-client

Add it to dashing's gemfile:

@dyson
dyson / bling.js
Last active August 29, 2015 14:23 — forked from paulirish/bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype
@dyson
dyson / s3.sh
Last active August 29, 2015 14:20 — forked from chrismdp/s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@dyson
dyson / ubuntu-install-nodejs.txt
Last active August 29, 2015 14:19
Ubuntu Install Node.JS
$ sudo apt-get install git git-flow
$ sudo apt-get install build-essential curl libreadline-dev libssl-dev
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | bash
$ nvm ls-remote
$ nvm install v0.12.2
@dyson
dyson / ubuntu-install-ruby.txt
Last active August 29, 2015 14:19
Ubuntu Install Ruby
$ sudo apt-get install git git-flow
$ sudo apt-get install build-essential libgdbm-dev libreadline-dev libssl-dev
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ exec $SHELL

If you're writing web applications with Ruby there comes a time when you might need something a lot simpler, or even faster, than Ruby on Rails or the Sinatra micro-framework. Enter Rack.

Rack describes itself as follows:

Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.

Before Rack came along Ruby web frameworks all implemented their own interfaces, which made it incredibly difficult to write web servers for them, or to share code between two different frameworks. Now almost all Ruby web frameworks implement Rack, including Rails and Sinatra, meaning that these applications can now behave in a similar fashion to one another.

At it's core Rack provides a great set of tools to allow you to build the most simple web application or interface you can. Rack applications can be written in a single line of code. But we're getting ahead of ourselves a bit.

@dyson
dyson / tdo.rb
Created July 27, 2014 15:06 — forked from sirupsen/tdo.rb
class TodoList < Array
def self.load(file)
# read the file, create a list, create items, add them to the list, return the list
list = TodoList.new
File.read(file).each_line do |line|
list << line.chomp
end
list
end