Skip to content

Instantly share code, notes, and snippets.

View beaudierman's full-sized avatar

Beau Dierman beaudierman

View GitHub Profile
@beaudierman
beaudierman / gist:4454618
Created January 4, 2013 18:07
Integrate RVM with Sublime Text 2 on Mac OS X
# Source: http://bit.ly/WiEa5q
# Confirmed working on Mac OS X Mountain Lion(v10.8.2)
# Open ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build
# Change the contents to match the following:
{
"env":{
"PATH":"${HOME}/.rvm/bin:${PATH}"
},
@beaudierman
beaudierman / snetip.sh
Created April 2, 2013 17:24
Find the ServiceNet IP of your Rackspace Cloud Load Balancer
#! /bin/bash
#########################################################
# Bash Script to find the Interal IP for Load Balancers #
#########################################################
echo "=================================================="
echo " ServiceNet IP for Load Balancers "
echo "=================================================="
@beaudierman
beaudierman / gist:5444977
Created April 23, 2013 16:11
How to install MySQL 5.6 on Ubuntu 12.04
I recently had to install MySQL 5.6 on Ubuntu 12.04 from a .deb package on the MySQL website. It seems that either the package has been updated recently or nobody uses this method to install so I ended up running into endless problems. Through trial and error I found the following method works for me.
Install libaio-dev:
sudo apt-get install libaio-dev
Now install your package(mine was enterprise edition, community may have a different filename):
sudo dpkg -i mysql-advanced-5.6.10-debian6.0-x86_64.deb
This will install your files to the /opt directory, instead of the more common /etc directory. No worries, all we need to do is point our system at this new directory.
@beaudierman
beaudierman / ssis-ftp-hack.cs
Created October 20, 2013 02:50
Hack for using an FTP Connection Manager in an SSIS package
object ftpConnectionManager = (object)Dts.Connections["FTP Connection Manager"];
string user = "user";
string pass = "pass";
Dts.Connections["FTP Connection Manager"].Properties["ServerUserName"].SetValue(ftpConnectionManager, user);
Dts.Connections["FTP Connection Manager"].Properties["ServerPassword"].SetValue(ftpConnectionManager, pass);
When your cron jobs have output, or, when they fail, email is sent to the following addresses
MAILTO="foo@bar.com,baz@qux.com"
The path of the user whose crontab you're setting up.
Use echo $PATH and copy the contents into the PATH variable
PATH="/usr/bin:/sbin:/bin"
The home directory that your crontab should be working in.
This can replace needing to cd /path/to/app/root in each script and using absolute paths.
@beaudierman
beaudierman / gist:7487737
Created November 15, 2013 16:58
After installing Ubuntu 13.10 with PHP 5.5.3 I kept getting the "Laravel Requires the mcrypt PHP extension" when trying to run artisan commands. Running the following commands on my server fixed the problem.
# Make sure you have php5-mcrypt installed first. If not, run
sudo apt-get install php5-mcrypt
# Add a symlink for mcrypt.ini in the PHP5 apache config directory
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
# Restart apache
sudo service apache2 restart
@beaudierman
beaudierman / fix.sh
Created December 2, 2013 15:58
Fix OS X Mavericks(10.9) Lag Issues
sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.securityd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.diskarbitrationd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchAgents/com.apple.coreservices.appleid.authentication ExitTimeOut -int 1
@beaudierman
beaudierman / gist:11219873
Created April 23, 2014 15:25
Ubuntu 14.04 Composer Mcrypt error while installing Laravel
## Run the following commands after making sure you have the php5-mcrypt extension installed
sudo php5enmod mcrypt
sudo service apache2 restart
@beaudierman
beaudierman / nat_monitor.sh
Created May 19, 2014 14:18
When needing to route specific traffic while using a NAT inside of the AWS VPC I use this script. I find it works better than routing 0.0.0.0/0 to the NAT since I use specific IP addresses to pass through the NAT, all other traffic using 0.0.0.0/0 -> IGW
#!/bin/sh
# This script will monitor another NAT instance and take over its routes
# if communication with the other instance fails
# NAT instance variables
# Other instance's IP to ping and route to grab if other node goes down
NAT_ID=
NAT_RT_ID=
# My route to grab when I come back up
@beaudierman
beaudierman / playlist_youtube.lua
Created January 14, 2015 16:08
Youtube Playlist Parser for VLC Media Player
--[[
Youtube playlist importer for VLC media player 1.1 and 2.0
Copyright 2012 Guillaume Le Maout
Authors: Guillaume Le Maout
Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or