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
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active April 24, 2024 18:56
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@alex88
alex88 / mysql_ramdisk.rb
Created July 19, 2013 13:03
Creates a ramdisk on osx and runs a mysql instance using pre-installed homebrew percona or mysql server Use directly to create, with 'shutdown' argument to tear off the mysql and the disk To connect use -h 127.0.0.1 -P3307
#!/usr/bin/env ruby
shutdown = false
cnf_path = '/usr/local/etc/my_ramdisk.cnf'
ramdisk_path = '/Volumes/RAMDisk'
loop { case ARGV[0]
when 'shutdown' then ARGV.shift; shutdown = true
else break
end; }
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@jakzal
jakzal / Doctrine.php
Last active September 14, 2020 13:19
Use Doctrine and Symfony Kernel in phpunit tests
<?php
declare(strict_types=1);
namespace SymfonyLive\Mastermind\Adapters\Database;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Tools\SchemaTool;
use RuntimeException;
@jeresig
jeresig / .vimrc
Created May 4, 2011 16:46
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on
@philsturgeon
philsturgeon / 0-intro.md
Last active June 7, 2018 09:34
PSR-2 v CodeSniffer PSR-2

This is a list of issues or discrepencies between the wording or intention of PSR-2 itself and the CodeSniffer PSR-2 ruleset.

Add suggestions in the comments or tweet me (@philsturgeon) if you have more inconsistencies to report.

@wa0x6e
wa0x6e / build.xml
Last active April 23, 2018 20:03
Faster php lint target for jenkins php
<!--
More faster : lint only modified files
--------------------------------------
We create a new target to retrieve a list of modified files
If there is modified files, execute the lint target, else skip
with the `if="modifiedFiles"` option.
The list of modified files is stored in ${files.modified}, one file per line.
@rudelyunethical
rudelyunethical / test_steps.rb
Created October 1, 2012 23:07
Ruby On Rails: Initial testing steps @cucumber
Given /^I am on the home page$/ do
visit "/"
end
Then /^I should see "([^"]*)"$/ do |text|
page.should have_content text
end