Skip to content

Instantly share code, notes, and snippets.

View adeubank's full-sized avatar
🌳

Allen Eubank adeubank

🌳
View GitHub Profile
#!/bin/bash
#
# USAGE: wait_until_done PID
#
# wait_until_done watches a process passed in as the first argument waits until
# it finishes
#
# Print the header comment from this file, ducking the shebang line, and stopping a the first line that doesn't start with a hash
function print_header_comment {
@adeubank
adeubank / idea64.exe.vmoptions
Created June 7, 2017 17:08 — forked from edwardbeckett/idea64.exe.vmoptions
Java 8 Intellij 64 JVM Options
-server
-Xms2g
-Xmx2g
-Xss16m
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:ConcGCThreads=4
-XX:ReservedCodeCacheSize=128m
-XX:+AlwaysPreTouch
-XX:+TieredCompilation
@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
@adeubank
adeubank / INSTALL.md
Last active February 3, 2018 19:39
Setting up automysqlbackup for backups everyday at 3AM and then saving with S3. Need to configure s3cmd with credentials and automysqlbackup. Assumes that all the backups are stored in `/backups`
$ sudo su
$ apt-get update
$ apt-get install s3cmd automysqlbackup
$ s3cmd --configure
# enter access key and secret and other details
$ vim /etc/default/automysqlbackup
# Set these variables
#   USERNAME
# PASSWORD
@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 / Vagrantfile
Created December 21, 2015 23:49
Vagrantfile for setting up Ubuntu 14.04 with Java 8 and Tomcat 8
# -*- 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 / tomcat.conf
Created December 21, 2015 22:42
Tomcat Upstart service with open JDK 8 for Ubuntu 14.04
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
setuid tomcat
setgid tomcat
@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 / 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 / wordpress-wp-super-cache.conf
Created August 17, 2015 20:03
Wordpress Super Cache nginx configuration
# WP Super Cache rules.
# Designed to be included from a 'wordpress-ms-...' configuration file.
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}