Skip to content

Instantly share code, notes, and snippets.

View adeubank's full-sized avatar
🌳

Allen Eubank adeubank

🌳
View GitHub Profile
@adeubank
adeubank / gist:fcbc5304ca61cefa5b3b
Created April 1, 2015 23:26
BEM with namespace HTML
<!DOCTYPE html>
<html>
<head>
<title>BEM with Namespace</title>
</head>
<!-- example of that BEM NAMESPACED -->
<body class="t-light">
@adeubank
adeubank / Makefile
Last active August 29, 2015 14:18 — forked from wolfeidau/Makefile
REPORTER = spec
all: jshint test
test:
@NODE_ENV=test ./node_modules/.bin/mocha --recursive --reporter $(REPORTER) --timeout 3000
jshint:
jshint lib examples test index.js
@adeubank
adeubank / default
Last active August 29, 2015 14:26
Simple PHP Nginx configuration for Ubuntu 14.04 after default installations
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /vagrant;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
@adeubank
adeubank / Vagrantfile
Created August 7, 2015 01:58
Vagrantfile for Ubuntu 14.04 running a LEMP stack for wordpress.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@adeubank
adeubank / setup_php56_stack.sh
Last active December 21, 2015 07:24
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy. Raw
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@adeubank
adeubank / toUSDateString.js
Created August 19, 2013 17:25
Add a method to print the United States date format to the global Date object for JavaScript.
// Add toUSDateString to global Date object, prints Mon/Day/Year
Date.prototype.toUSDateString = function () {
return (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getFullYear();
};
(new Date()).toUSDateString(); // "MM/DD/YYYY"
@adeubank
adeubank / detectCSSFeature.js
Last active December 21, 2015 13:29
Detect if a browser supports a CSS feature. Courtesy of Stack Overflow. http://stackoverflow.com/questions/10888211/detect-support-for-transition-with-javascript
/**
* Detect if a browser supports a CSS feature.
* Courtesy of Stack Overflow.
* http://stackoverflow.com/questions/10888211/detect-support-for-transition-with-javascript
*
*/
function detectCSSFeature(featurename){
var feature = false,
domPrefixes = 'Webkit Moz ms O'.split(' '),
elm = document.createElement('div'),
@adeubank
adeubank / ruby-vagrant-provision.sh
Last active January 15, 2016 03:54 — forked from johanneswuerbach/rails-vagrant-provision.sh
Provision a vagrant box with ruby stable (using rvm)
#!/usr/bin/env bash
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev nodejs
ln -s /usr/bin/nodejs /usr/bin/node
@adeubank
adeubank / setup_php70_stack.sh
Last active May 5, 2017 17:06 — forked from rrosiek/install_mysql.sh
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy.
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@adeubank
adeubank / IntelliJ_IDEA__Perf_Tuning.txt
Last active June 7, 2017 17:07 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1