Skip to content

Instantly share code, notes, and snippets.

View ryanmaclean's full-sized avatar
🍩
Running tf apply 💜

Ryan MacLean ryanmaclean

🍩
Running tf apply 💜
View GitHub Profile
@ryanmaclean
ryanmaclean / gist:5c75597c3a65ec4b7c21
Last active August 29, 2015 14:22 — forked from AggroBoy/gist:1242257
Escape XML with Sed
sed -e 's~&~\&amp;~g' -e 's~<~\&lt;~g' -e 's~>~\&gt;~g' -e 's~\"~\&quot;~g' -e "s~\'~\&apos;~g"
@ryanmaclean
ryanmaclean / alfresco-installer.bin.out
Created June 12, 2015 23:19
Alfresco One 5.0.1 Command Line Installer Options
./alfresco-installer.bin --help
Alfresco One 5.0.1
Usage:
--help Display the list of valid options
--version Display product information
--unattendedmodeui <unattendedmodeui> Unattended Mode UI
Default: none
@ryanmaclean
ryanmaclean / opsworksIP.sh
Last active August 29, 2015 14:23
Get IP Address for a given OpsWorks Layer Instance ID
aws opsworks --region us-east-1 describe-instances --instance-ids 82hu7s86-ff57-4fc8-0000-f3cb364b125e | grep PrivateIp | awk -F '"' '{print $4}'
@ryanmaclean
ryanmaclean / fstab
Last active August 29, 2015 14:23
Linux Persistent SMB Mount with Password
//server-name/share-name /media/local-location cifs defaults,uid=1000,gid=1000,credentials=/root/.smbcredentials,iocharset=utf8 0 0
@ryanmaclean
ryanmaclean / mysqldump.cron
Last active August 29, 2015 14:23
MySQL Dump One-Liner for Cron
0 0 * * * /usr/bin/mysqldump -u mysql_adm -P 3306 -h 127.0.0.1 -pPASSWORD DBNAME | gzip -c > /tmp/backups/DBNAME`date +\%d-\%m-\%Y`.gz && sudo mv /tmp/backups/* /media/local-location/
@ryanmaclean
ryanmaclean / GetDBBackupStatus.ps1
Created June 30, 2015 18:53
Powershell Script to Retrieve SQL Backup Status
Import-Module "sqlps" -DisableNameChecking
Function Get-DBBackupInfo ($SQLInstance, $DBName)
{
if ($SQLInstance.Contains("`\"))
{ $location = "SQLSERVER:\SQL\$SQLInstance\Databases" }
@ryanmaclean
ryanmaclean / totara.cron
Created July 2, 2015 18:30
Copy Totara SiteData to an SMB Share Daily
0 0 * * * tar czf /tmp/backups/TotaraSiteData`date +\%d-\%m-\%Y`.gz /var/sitedata/ && mv /tmp/backups/* /media/cifsshare/
@ryanmaclean
ryanmaclean / docker_cheat_sheet.sh
Last active July 13, 2017 10:11
Mac OSX Yosemite and AWS ECS Docker Setup with Command Cheat Sheet
########################################################
### Getting Docker on a Macintosh 10.10 computer & ###
### Commands to use for administration of Docker ###
### "ubuntu" is used as a variable name here ###
### for a generic instance name. ###
########################################################
### Most of the commands are cribbed from "Docker ###
### up and Running" ###
### http://shop.oreilly.com/product/0636920036142.do ###
### The rest are things related to personal testing ###
brew install zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
brew install tmux mc wget vim
@ryanmaclean
ryanmaclean / Windows Dev Environment.md
Last active August 29, 2015 14:25
Windows 7 Dev Environment for Python, Docker and AWS
  • conemu
  • kitematic
  • vagrant
  • virtualbox
  • cygwin

Once these are installed, you'll want the following Cygwin packages:

  • zsh
  • apt-cyg
  • python