Skip to content

Instantly share code, notes, and snippets.

@dwayne
dwayne / 00-install-on-64-bit-ubuntu-14.04.md
Last active January 12, 2024 17:48
Installing node and npm on Ubuntu 12.04 LTS and 64-bit Ubuntu 14.04 LTS.
  1. Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.

  2. Say you've downloaded node-v0.10.7-linux-x64.tar.gz into the Downloads directory. Then, open the terminal and type the following:

$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.bashrc
@dwayne
dwayne / quotes.json
Last active January 8, 2024 10:19
Quotes for the random quote machine web app
{
"quotes": [
{ "text": "Life isn't about getting and having, it's about giving and being.", "author": "Kevin Kruse" },
{ "text": "Whatever the mind of man can conceive and believe, it can achieve.", "author": "Napoleon Hill" },
{ "text": "Strive not to be a success, but rather to be of value.", "author": "Albert Einstein" },
{ "text": "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" },
{ "text": "I attribute my success to this: I never gave or took any excuse.", "author": "Florence Nightingale" },
{ "text": "You miss 100% of the shots you don't take.", "author": "Wayne Gretzky" },
{ "text": "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" },
{ "text": "The most difficult thing is the decis
@dwayne
dwayne / ch1.md
Last active January 2, 2024 13:22
My notes from the book "Crafting Rails 4 Applications by José Valim"

Chapter 1 - Creating Our Own Renderer

Rails provides an API that we can use to create our own renderers. In this chapter we explore the API as we modify the render() method to accept :pdf as an option and return a PDF created with Prawn.

To create a new plugin just run the following:

$ rails plugin new my_plugin

TODO Complete notes

@dwayne
dwayne / ch1.md
Last active September 4, 2023 04:45
My notes from the book "Eloquent Ruby by Russ Olsen"

Chapter 1

Every programming community quickly converges on a style, an accepted set of idioms. Programming is all about communication and knowing those idioms are key to being a successful programmer in that community.

Ruby style of programming:

  • Code should be crystal clear, it should shout its intent
  • Good code is also concise

Ruby indentation convention:

@dwayne
dwayne / custom-properties.md
Last active August 7, 2023 08:34
Elm Odds and Ends

Custom Properties in Elm

Html.Attributes.style does not support setting custom properties. For e.g. the following won't work:

style "--alert-text-color" "#123456"

re: [Asking for support][support]

@dwayne
dwayne / 01-intro.md
Last active June 27, 2023 02:42
My notes from the book "ng-book: The Complete Book on AngularJS by Ari Lerner".

Introduction

Author: Ari Lerner.

AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:

  • Module support
  • DOM manipulation
  • Animations
  • Templating
@dwayne
dwayne / 0-intro.md
Last active February 28, 2023 22:10
My notes from the book "Authority by Nathan Barry".

A Step-By-Step Guide To Self-Publishing

Become an expert, build a following, and gain financial independence.

by Nathan Barry

Table of Contents

@dwayne
dwayne / 00-introduction.md
Last active November 5, 2022 23:05
How to build a Hypermedia-Driven REST API - Notes
@dwayne
dwayne / 00-ionic-notes.md
Last active October 13, 2022 15:05
My notes on the Ionic Framework.
@dwayne
dwayne / 00-introduction.md
Last active October 3, 2022 16:04
Surviving APIs with Rails Notes