Skip to content

Instantly share code, notes, and snippets.


Jeffery Bennett Meandmybadself

View GitHub Profile
Meandmybadself / export-databases.php
Last active Aug 29, 2015
Export mySQL databases via PHP
View export-databases.php
//In the event that PHP / mySQL is set up funkily.
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
ini_set('display_errors', '1');
//Fill these in.
$host = '';
$username = '';
$password = '';
View gruntfile.js
module.exports = function(grunt) {
app: {
devDir: './app',
distDir: './dist'
clean: {
dist:['<%= app.distDir %>']
View boilerplate.html
<!DOCTYPE html>
<html lang='en'>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- fb -->
View gist:9f546e4bc13741ede58e
### Keybase proof
I hereby claim:
* I am meandmybadself on github.
* I am meandmybadself ( on keybase.
* I have a public key whose fingerprint is 0A33 C8A8 9D60 A9CF FAFF 103B C1BB 1B59 DE76 ABC0
To claim this, I am signing this object:
Meandmybadself /
Created Jan 16, 2015
Organize Downloads / rsync to seedbox
#Seedbox deets.
Meandmybadself / c5-nginx.conf
Created Mar 17, 2015
Concrete5 + NGINX conf
View c5-nginx.conf
server {
listen 80;
root /var/www/html/;
index index.html index.htm index.php;
access_log /var/log/nginx/domain_access.log main;
error_log /var/log/nginx/domain_error.log debug;
View config.js
"description":"Basic statement of work",
"projectTitle":{"label":"Project Title", "default":"Fart"}
# install homebrew
ruby -e "$(curl -fsSL"
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
Meandmybadself / utilitybelt.js
Last active Nov 12, 2015
JavaScript utility belt
View utilitybelt.js
//A continual schmorgasboard of code that probably exists in a better documented & executed function elsewhere.
//Produces a # between min and max.
function between(min,max) {
var d = Math.abs(min - max);
return min + Math.random() * d;
//Integer between min & max.
function intBetween(min,max) {
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';