Skip to content

Instantly share code, notes, and snippets.

View kgust's full-sized avatar

Kevin Gustavson kgust

  • Vanderbilt University Medical Center
  • Nashville, Tennessee USA
View GitHub Profile
@kgust
kgust / are-you-doing-it-wrong-test.md
Created March 13, 2014 13:11
Are you doing it wrong? A checklist for software development.
@kgust
kgust / 0_reuse_code.js
Created March 13, 2014 13:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kgust
kgust / hack.sh
Created March 13, 2014 13:41
Shell script of useful Mac tips.
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it: [links are broken]
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
# curl -sL https://gist.githubusercontent.com/kgust/9528677/raw/87abace383ef4321d6e9174c29105f66300331d7/hack.sh | sh
# see it at: https://gist.github.com/kgust/9528677#file-hack-sh
@kgust
kgust / gist:9528688
Created March 13, 2014 13:41
Generate Noise on a Canvas
function generateNoise(opacity) {
if ( !!!document.createElement('canvas').getContext ) {
return false;
}
var canvas = document.createElement("canvas"),
ctx = canvas.getContext('2d'),
x, y,
number,
opacityopacity = opacity || .2;
@kgust
kgust / front_end_resources.md
Created March 13, 2014 13:42
Front End Development Resources

Front End Development Resources

This GIST contains a list of front end development frameworks, libraries, and plugins I have found or used at some point or another.

This was inspired by a list I saw on github at https://github.com/mrmartineau/ZM-Resources.

* libraries I (mcallan83) have used

Front End Frameworks

  • 960 Grid System* - grid system that provides commonly used dimensions, based on a width of 960 pixels
/**
* jQuery Plugin Boilerplate
*
* Call the plugin by supplying a method and/or options:
*
* $("element").myplugin();
* $("element").myplugin({ option1: true, option2: true });
* $("element").myplugin("secondary_method");
* $("element").myplugin("secondary_method", { option1: true, option2: true });
*
@kgust
kgust / MacSettings.sh
Last active August 29, 2015 13:59
MacSettings Shell Script (from Mike)
#!/usr/bin/env bash
##
# From https://github.com/mathiasbynens/dotfiles/blob/master/.osx
##
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
<?php
require 'vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
class ExampleTest exends TestCase
{
/** @test */
function it_hashes_a_provided_password()
{
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
<?php
public function write_record() {
if(request::is_ajax()) $this->template = new View('ajax');
else die('Invalid request.');
in_array($_POST['type'], array('Sermons','Aces','Portraits','Dedications')) or die('Invalid form request.');
// Field Types
// Sermon: series, title, preacher, scripture, reader, date, disk, type
// Aces: series, title, teacher, comment, date, disk