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
@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;
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active February 21, 2024 23:28
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:
@michalsen
michalsen / gist:8625e0736d1c9fb4a564
Last active August 29, 2015 14:05
#FVCP Sep2014
/**
* Notes and various links mentioned in
* FVCP and FVDrupalCamp 2014
* on web page speed, testing and loading
*/
Developer Tools in browser.
Load page under Network
Can save load meta data as HAR file (rt click / save as HAR with content)
@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
@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.

@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; }
@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
@rudelyunethical
rudelyunethical / test.feature
Created October 1, 2012 23:04
Ruby On Rails: Initial feature @cucumber
Feature: Testing Configuration
In order to have a base for my new application
As a developer
I want to test the configuration settings for this application
Scenario: Test Home Page
Given I am on the home page
Then I should see "home"
@jnejunior
jnejunior / css
Created October 1, 2012 22:46
CSS reset Eric Meyer
html, body, div, span, applet, object, iframe, table, caption,
tbody, tfoot, thead, tr, th, td, del, dfn, em, font, img, ins,
kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr,
acronym, address, big, cite, code, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend {
vertical-align: baseline;
font-family: inherit;
font-weight: inherit;
font-style: inherit;
@BrettBukowski
BrettBukowski / gist:3814745
Created October 1, 2012 22:03
Quick reflection for PHP classes
/**
* Provides quick reflection, usually so that the caller can access private
* methods and properies in a single pass.
*
* If called with a single String classname, then the \ReflectionClass of
* that class is returned.
* Accepts any number of additional Strings that are names of properties or
* methods to make accessible and return. Methods should be prefixed with 'method:'.
* The return value is an array containing the mapped reflection class and the properties / methods.
*