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
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@ryanmaclean
ryanmaclean / flush_dns_yosemite.sh
Created October 27, 2014 20:13
Flush DNS Cache in Yosemite
## This will flsuh your DNS cache, note that some browsers maintain their own cache
dscacheutil -flushcache
@ryanmaclean
ryanmaclean / install_alfresco.sh
Last active August 29, 2015 14:08
Alfresco One 4.2.3.1 One-Line Installer
#############################################################################################
# This opinionated oneline installer assumes that you want internal PostgreSQL, #
# Google Docs integration, LibreOffice, Solr, Java, Sharepoint and Tomcat to be installed. #
# Note that the password is stored in the $PASSWORD variable - you can set this #
# in the one-liner or outside of this code. #
# Documented here: http://docs.alfresco.com/4.2/concepts/silent-alf-install.html #
# Further: http://blyx.com/2014/02/20/alfresco-tip-unattended-installation-with-one-command #
#############################################################################################
alfresco-enterprise-4.2.3.1-installer-linux-x64.bin --prefix /opt/alfresco \
@ryanmaclean
ryanmaclean / ssh_aws.sh
Created October 29, 2014 23:07
SSH to Non-Standard Port on EC2 Local-Only Load Balancer at AWS with Key from Google Drive
# Replace SECRETKEY.pem with your key, 2020 with the port, loadbalancername with
# the name of your load balancer.
ssh -i ~/Google\ Drive/SECRETKEY.pem -p 2020 ec2-user@loadbalancername
@ryanmaclean
ryanmaclean / alfresco_startup_script_modified.sh
Last active August 29, 2015 14:08 — forked from billerby/alfresco
Run Alfresco Start Up Script as a User Other Than Root
#!/bin/sh
#
# chkconfig: 2345 80 30
# description: Alfresco Enterprise
#
# Username YOURUSER used in this case. Replace with one defined locally
# e.g.: with Chef or Puppet.
$YOURUSER = YOURUSER
RETVAL=0
@ryanmaclean
ryanmaclean / remove_win8_hiberfil
Last active August 29, 2015 14:16
Remove Windows 8.1 Hibernation File
If you're like me and rarely use sleep or hibernation on your desktop and have some systems with small root SSDs,
this will probably come in handy. Windows 8.1 has changed a few things around so that getting an admin command
prompt is slightly different than Windows 7, but that's easily sorted.
To remove the pesky hiberfil.sys:
- Press Win
- Type :cmd"
- Confirm with shift+ctl+enter
- Type powercfg -h off
- hit enter
@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}'