Skip to content

Instantly share code, notes, and snippets.

View dwayne's full-sized avatar

Dwayne Crooks dwayne

View GitHub Profile
@dwayne
dwayne / howtos.md
Last active October 7, 2015 16:18
HOWTOs

HOWTOs

How to prepare Ubuntu 12.04 LTS for installing from source

https://help.ubuntu.com/community/CompilingEasyHowTo

$ sudo apt-get install build-essential checkinstall

How to change the font or background colours of an embedded terminal in the gedit bottom panel

@dwayne
dwayne / django-on-heroku.md
Created August 12, 2012 13:20
Setting up Django and Deploying to Heroku
@dwayne
dwayne / installing-pil.md
Created August 14, 2012 21:12
Installing PIL on Ubuntu 12.04 LTS

Steps to install PIL

$ sudo apt-get install python-imaging
$ sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

$ pip install PIL

@dwayne
dwayne / a-modern-frontend-dev.md
Last active March 21, 2021 11:38
Articles, tutorials and tools for modern front-end development.

Problem: What does a Modern Front-End Development Workflow Look Like?

I want to start writing libraries and large applications using the JavaScript language. However, I don't know how to setup the project and which build tools to use. What I do know is that the JavaScript community has moved way beyond using browser developer tool plugins and strategically-placed console.log() statements to debug, test, and build code.

I need help.

Below, I will keep track of articles, tutorials and tools I come across as I search for a way to bring my front-end development chops up-to-date.

The Ultimate Resource

@dwayne
dwayne / hello.ru
Last active December 11, 2015 23:09
Notes on Rack
# Tell Rack to run this application using `rackup hello.ru`
app = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, ['Hello, world!']] }
run app
# What is `rackup`?
# `rackup` is an executable that takes the code, finds a web server for it and then runs it.
# See https://github.com/rack/rack/blob/f65969ccac8f6098acee9b1ab506283dfcdf18a5/bin/rackup.
@dwayne
dwayne / HttpOrigin.md
Last active August 17, 2018 20:10
Things I've learnt while developing Facebook applications with Sinatra.

Problem

When logging is turned on you see the warning: attack prevented by Rack::Protection::HttpOrigin.

Fix

set :protection, :origin_whitelist => ['https://s-static.ak.facebook.com']

or

@dwayne
dwayne / setup.md
Last active December 16, 2015 09:39
Python Development

Setup pip and virtualenv in Ubuntu 12.04 LTS

Pip requires distribute. So we'd install distribute first.

$ cd Downloads/
$ curl -O http://python-distribute.org/distribute_setup.py
$ sudo python distribute_setup.py

Now we can install pip.

<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">