Skip to content

Instantly share code, notes, and snippets.

@bamper
bamper / example
Created July 6, 2015 09:50
Example
(function() {
'use strict';
}())
@bamper
bamper / pdo-wrapper.php
Last active September 12, 2015 22:04 — forked from eimg/pdo-wrapper.php
Simple yet secure PHP PDO database wrapper with CRUD methods...
<?php
# PDO Wrapper, supporting MySQL and Sqlite
# Usage:
# $db = new db();
#
# // table, data
# $db->create('users', array(
# 'fname' => 'john',
# 'lname' => 'doe'
# ));
@bamper
bamper / 0_reuse_code.js
Created November 5, 2015 08:14
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
@bamper
bamper / ApiTestCase.php
Last active February 18, 2016 23:17
SQLite setup
<?php
namespace AppBundle\Test;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
@bamper
bamper / 000-Cheat-Sheets.md
Created February 21, 2016 21:46 — forked from JoshuaEstes/000-Cheat-Sheets.md
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
#!/bin/sh
temporaryPath="$(mktemp -t php-no-debug.XXXX)"
find /etc/php5/cli/php.ini /etc/php5/cli/conf.d/*.ini ! -name 20-xdebug.ini | xargs cat > "$temporaryPath"
/usr/bin/php -n -c "$temporaryPath" "$@"
rm -f "$temporaryPath"