Skip to content

Instantly share code, notes, and snippets.

Dwayne Crooks dwayne

Block or report user

Report or block dwayne

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
dwayne / quotes.json
Last active Jun 21, 2019
Quotes for the random quote machine web app
View quotes.json
"quotes": [
{ "content": "Life isn't about getting and having, it's about giving and being.", "author": "Kevin Kruse" },
{ "content": "Whatever the mind of man can conceive and believe, it can achieve.", "author": "Napoleon Hill" },
{ "content": "Strive not to be a success, but rather to be of value.", "author": "Albert Einstein" },
{ "content": "Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.", "author": "Robert Frost" },
{ "content": "I attribute my success to this: I never gave or took any excuse.", "author": "Florence Nightingale" },
{ "content": "You miss 100% of the shots you don't take.", "author": "Wayne Gretzky" },
{ "content": "I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.", "author": "Michael Jordan" },
{ "content": "The most diff
dwayne / 0-Start.elm
Last active Apr 30, 2017
Elm: Formatting a value as money
View 0-Start.elm
module Main exposing (..)
import Html exposing (..)
main =
view init
dwayne /
Last active Jun 25, 2016
Vagrant and VirtualBox
dwayne / Vagrantfile
Last active Aug 15, 2018
Play with Python 3.5.1 in Vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config| = 'ubuntu/trusty64'
config.vm.provision 'shell', path: 'install-python'
dwayne /
Last active Jan 5, 2016
Python Dev

Installing Python from source on Ubuntu

For whatever reason you may want to upgrade your version of Python that came with your Ubuntu distro. However, completely replacing the system version is not recommended. Here is how to install Python for the local user.

Python 2.7.10

$ mkdir ~/local/python-2.7.10
$ cd ~/Downloads
dwayne /
Last active Feb 23, 2017
Django Notes (Python 3.5.1 and Django 1.9.x)

Getting Started

Install Python, follow the steps here.

Steps I take when beginning a new Django project.

$ mkdir [project_name]_project
$ cd [project_name]_project
dwayne /
Last active Sep 15, 2015
Discourse Notes

Getting Started with Discourse on Ubuntu 14.04 LTS

Software you need

The process

dwayne /
Created Jul 31, 2015
Understanding HTTP Cookies

I will use the simple Sinatra application below to explain.

First, we run the app.

$ ruby app.rb

This launches a server at localhost:4567.


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

dwayne /
Last active Sep 12, 2015
Ruby Under a Microscope: Notes (sr bookclub)

Ruby Under a Microscope


To understand how Ruby works, read its C source code. After learning each part of Ruby's internal implementation we perform an experiment and use Ruby to test itself.

Most of the book discusses how MRI works.

MRI (Matz's Ruby Interpreter) was invented in 1993 by Yukihiro Matsumoto a.k.a Matz.

You can’t perform that action at this time.