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 / parse-composer-lock.sh
Last active October 12, 2023 18:19
Using jq to parse composer.lock
<composer.lock jq '.packages[] | [.name, .version]' | less
@kgust
kgust / gist:5300d89bfcc2b1158dad
Last active November 27, 2018 13:52
cVim Options
" old cVimrc
" let blacklists = ["https://mail.google.com/* gi gt j k l o r x y #"]
" blacklists prefixed by '@' act as a whitelist
let blacklists = ["https://mail.google.com/*", "*://mail.google.com/*", "@https://mail.google.com/mail/*"]
let mapleader = ","
@kgust
kgust / tmux.md
Last active August 29, 2015 14:15 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@kgust
kgust / vim.svg
Last active August 29, 2015 14:11 — forked from sjl/vim.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

How to become a decent photographer in five years

You're not gonna become a master in your spare time, but you can get decently good at photography in five years of dedicated but non-full-time practice. It's taken me about twice that to get decent, but I fucked around a lot along the way.

You don't need a ton of fancy equipment, but photography does require some gear. I'll limit the gear-buying here to once a year (not counting books).

@kgust
kgust / Web Performance.md
Last active August 29, 2015 14:06 — forked from michalsen/gist:8625e0736d1c9fb4a564
Web Performance Tricks
@kgust
kgust / PHPStorm-vs-Vim.md
Last active August 29, 2015 14:03
As an ardent Vim user, I'm exploring the features of PHPStorm.

Features that PHPStorm has that Vim doesn't.

  • Better support for finding things (files, classes, methods, symbols, etc.)
  • Basic Vi keybinding support (grafted on)
    • Vi binding does not support count (e.g. 2gT)
    • Vi binding does not support surround (Vim plugin style)
  • Powerful refactoring tools
  • In-page syntax support (show Javascript in an HTML page)

Features that Vim has that PHPStorm doesn't.

<?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
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
require 'vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
class ExampleTest exends TestCase
{
/** @test */
function it_hashes_a_provided_password()
{