Skip to content

Instantly share code, notes, and snippets.

View david-j-davis's full-sized avatar
🏠
Working from home

David J. Davis david-j-davis

🏠
Working from home
View GitHub Profile
@david-j-davis
david-j-davis / HUD-median-incomes-1985-2009.csv
Last active November 16, 2016 02:26
HUD Median Household Incomes from 1987-2009
city 1987 1989 1991 1993 1995 1997 1999 2001 2003 2005 2007 2009
Austin, TX 33400 37200 41000 41800 43200 48600 55400 64700 66900 67300 69300 73300
Bakersfield, CA 28100 31000 33300 35000 36600 37700 38700 40300 42800 46600 47800 52200
Boulder-Longmont, CO 37600 41700 43900 50500 54200 61200 68700 81400 81900 82000 82500 89100
Colorado Springs, CO 28400 31900 34100 39100 40200 45300 48000 53600 59700 63400 65500 70800
Dallas, TX 35600 39700 43900 45500 47000 52300 58200 64400 65000 65100 62200 67600
Denver, CO 35900 39500 41900 46400 48600 54900 58600 64400 68000 71650 71400 76000
Detroit, MI 35500 39900 44600 46700 47000 53300 60500 66500 66700 67800 67033 70883
Fresno, CA 27600 30600 33400 33000 34600 35600 37200 39700 41700 45900 49950 52850
Houston, TX 38300 41000 42400 42500 45300 49100 54100 58500 59100 61000 57300 63800
@david-j-davis
david-j-davis / .bash_profile
Last active December 8, 2016 20:15 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@david-j-davis
david-j-davis / index.js
Created March 26, 2017 17:56
NPM scripting package.json and express server boilerplate
var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
app.use(express.static(__dirname + '/public'));
app.listen(port, function (err) {
if (err) {
throw err;
}
@david-j-davis
david-j-davis / gulpfile.js
Created March 26, 2017 18:03
Gulpfile.js boilerplate
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
@david-j-davis
david-j-davis / gulpfile.js
Created March 26, 2017 20:52
Gulpfile.js boilerplate v.2
var gulp = require('gulp'),
browserSync = require('browser-sync').create(),
sass = require('gulp-sass'),
cleanCSS = require('gulp-clean-css'),
postcss = require('gulp-postcss'),
prefix = require('autoprefixer'),
concat = require('gulp-concat'),
gulpIf = require('gulp-if'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
@david-j-davis
david-j-davis / README.md
Last active March 29, 2017 11:05
Casper.js headless test tool screenshot example

Using Casper.js

What is Casper?

It's a headless testing tool. Description taken from: https://www.npmjs.com/package/casperjs CasperJS is a navigation scripting & testing utility for PhantomJS and SlimerJS (still experimental). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as:

  1. defining & ordering navigation steps
  2. filling forms
  3. clicking links
  4. capturing screenshots of a page (or an area)
  5. making assertions on remote DOM
@david-j-davis
david-j-davis / gulpfile.js
Last active April 17, 2017 22:25
Creates an svg spritesheet from svgs located in a project folder using gulp-svg-sprite module
var svgSprite = require('gulp-svg-sprite');
gulp.task('svg-sprite', function () {
console.log('Creating svg sprite...');
// Basic configuration example
var config = {
mode: {
css: {
dest: '.',
sprite: './img/sprite.svg',
@david-j-davis
david-j-davis / gulpfile.js
Created April 17, 2017 22:36
Create sprite sheets with gulp.spritesmith and GraphicsMagick to create spritesheets for both retina and non-retina devices
var spritesmith = require('gulp.spritesmith'),
gm = require('gm');
gulp.task('sprite', function () {
console.log('Creating sprite(s)...');
var spriteData = gulp.src('./path/to/your/image/sprites/*.png')
.pipe(spritesmith({
// Filter out `-2x` (retina) images to separate spritesheet
// e.g. `github-2x.png`, `twitter-2x.png`
retinaSrcFilter: './path/to/your/image/sprites/*@2x.png',
@david-j-davis
david-j-davis / gulpfile.js
Created April 17, 2017 22:40
Takes retina images and downsizes them inside to non-retina images in the same folder using gulp-retinize
var retinize = require('gulp-retinize');
gulp.task('retiniizing', function(file) {
/* NOTE: Retinize accepts @4x and @2x resolutions, outputting to @4x, @2x, and @1x.
Overrides may be implemented by manually creating lower resolution copies in the source directory. */
const retinizeOpts = {
// Your options here.
};
console.log('Retinizing images...');
@david-j-davis
david-j-davis / Contract Killer 3.md
Created September 21, 2018 04:49
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post