Skip to content

Instantly share code, notes, and snippets.

Andrew Hayes AndrewRussellHayes

Block or report user

Report or block AndrewRussellHayes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AndrewRussellHayes
AndrewRussellHayes / cloudSettings
Last active Aug 8, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-08-08T15:55:20.002Z","extensionVersion":"v3.2.9"}
View haproxy.cfg
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
@AndrewRussellHayes
AndrewRussellHayes / iptables_rules.sh
Created Dec 7, 2016 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
View iptables_rules.sh
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
View gist:f40fe593623cb9f5c55e9bd4d729f861
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
@AndrewRussellHayes
AndrewRussellHayes / rename.sh
Created Jul 3, 2016
rename dotfiles without dots. NOTE: uses rename command
View rename.sh
#brew install rename (for macosx)
rename 's/^\.*//' .*
@AndrewRussellHayes
AndrewRussellHayes / README.md
Last active Mar 22, 2016 — forked from linjunpop/README.md
Rails flash messages with AJAX requests
View README.md
View Start up local Docker Machine on OSX automatically.md

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).

Usage

The git.io URL (http://git.io/vsk46) is a shortened form of the raw url of the plist.

@AndrewRussellHayes
AndrewRussellHayes / ssh_helper.sh
Created Oct 22, 2015
Install local ssh key on remote host
View ssh_helper.sh
ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
@AndrewRussellHayes
AndrewRussellHayes / OutputStreamWriter.java
Created Oct 20, 2015
OutputStreamWriter is the preferred file write method as it does not make encoding assumptions
View OutputStreamWriter.java
try (OutputStreamWriter osw =
new OutputStreamWriter(new FileOutputStream("/FilePath/Here"), "UTF-8")) {
PrintWriter pw = new PrintWriter(osw);
pw.write("Hello World");//does not add newline character
pw.close();
} catch (IOException e) {
e.printstacktrace;
}
View gist:e351df8e1c96a1deba67
<div class="row improve-article-wrapper">
<div class="col-sm-1 col-sm-offset-1">
<a class="btn btn-primary btn-lg" href="https://github.com/{{ site.github.repository_nwo }}/edit/{{ site.branch }}/{{ page.path }}" title="Help Improve article {{ page.path }}">Edit</a>
</div>
<div class="col-sm-3">
<a class="btn btn-success btn-lg" href="{{ site.github.owner_url }}" title="Link to {{site.github.owner_name}} GitHub"><span class="fa fa-github">&nbsp;</span>Author Github</a>
</div>
<div class="col-sm-6 col-sm-offset-1">
<p class="improve-article">This content is open source. <br />
Please <a href="https://github.com/{{ site.github.repository_nwo }}/edit/{{ site.branch }}/{{ page.path }}" title="Help Improve article {{ page.path }}">help improve it</a>.</p>
You can’t perform that action at this time.