Skip to content

Instantly share code, notes, and snippets.

View blzaugg's full-sized avatar

Byran Zaugg blzaugg

View GitHub Profile

Linux

Mounting Shares

View Current Mounts

$ mount

Types of Tests

Unit

eg. With simulated state/input, call one method. Compare result with expectation.
Ensures the method does what the programmer expects

  • Smallest independent unit of code.
  • No calls to, non-trivial collaborators (methods, IO, DB).
  • Written by developers, for developers, from the developer's perspective.
  • Changes frequently within major/minor releases.

Basic Syntax

Comments

age = 31 #this is a comment
"""How do these "comments" work? Are they comments?"""

Variables

  1. Screen width/size: Just because my viewport is 960px wide, doesn't mean I'm on an iPad, tablet, etc. My desktop, as well as the majority of laptops today, are 1920px wide. 1920 / 2 = 960, which fits two browser windows, side by side, very nicely. I hate having to use hamburger/hotdog menus, when "normal" navigation would work just fine on both mobile & desktop. Lets not handicap users, just because we make assumptions about the device they are on.

  2. Device agnostic: Rather than mobile vs desktop, it's becoming a point that we need to design for The Web, not devices. The Web is not just phones, tablets, and desktops. It's also screen readers, TVs, embedded devices, etc. Also, we don't know what's coming next.

  3. Input types: There are a variety of devices today that support a variety of inputs. With just these three input types -- touch, mouse, keyboard -- we need to account for 27 different input combinations. And there may be others we haven't accounted for. My little Andriod phone supp

Create a new Django Project

$ django-admin.py startproject <name>

Run Django Dev Server

$ python manage.py runserver

Linux

See Linux Notes.md

Wordpress

Installed at: /var/www/wordpress/

Theming

@blzaugg
blzaugg / restroomEtiquette.js
Created March 20, 2013 22:17
restroomEtiquette
function restroomEtiquette(you, restroom) {
while (true) {
if (you.needToGo === 1) {
if (you.okayWithUrinals && restroom.urinalAvailable()) {
var urinal = restroom.occupyAvailableUrinal(you);
you.evacuate(urinal);
urinal.flush();