Skip to content

Instantly share code, notes, and snippets.

View noah-goodrich's full-sized avatar

Noah Goodrich noah-goodrich

View GitHub Profile
@noah-goodrich
noah-goodrich / setup.sh
Last active July 2, 2018 21:38
icentris-setup
#!/bin/bash
echo "Changing to home directory"
cd ~
## Check for existence of .netrc file
if [ ! -f .netrc ]; then
echo ".netrc not configured."
fi
@noah-goodrich
noah-goodrich / docker-compose.yml
Last active June 21, 2018 20:43
docker-compose.yml
version: '3.2'
services:
db:
image: mariadb:10.2
container_name: db
environment:
- MYSQL_USER=pyr
- MYSQL_PASSWORD=pyr
- MYSQL_HOST=%
- MYSQL_ROOT_PASSWORD=password1
@noah-goodrich
noah-goodrich / example.sql
Created June 20, 2015 03:30
Example table and data set for finding groupings of rows based on time overlap
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table example
@noah-goodrich
noah-goodrich / gist:9191837
Created February 24, 2014 16:40
Declaration of A::test() must be compatible with C::test($var)
<?php
echo 'Begin Test<br/>';
Interface C {
public function test($var);
}
echo 'Declared C<br/>';
@noah-goodrich
noah-goodrich / .vimrc
Created February 23, 2014 03:53
My .vimrc
let &viewdir=expand("$HOME") . "/.vim/views"
if !isdirectory(expand(&viewdir))|call mkdir(expand(&viewdir), "p", 451)|endif
set nocompatible
syntax enable
set encoding=utf-8
filetype off " required for vundle
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

@noah-goodrich
noah-goodrich / Mapper.php
Created May 17, 2013 21:36
Overriding the default findAll() method to use PDOStatement
public function findAll(\Gacela\Criteria $criteria = null)
{
$data = $this->_source()
->findAll(
$this->_source()->getQuery($criteria),
$this->_resource,
$this->_inherits,
$this->_dependents
);