Skip to content

Instantly share code, notes, and snippets.

View blasterpal's full-sized avatar

Hank Beaver blasterpal

View GitHub Profile
@ryansimms
ryansimms / circleci-2.0-eb-deployment.md
Last active February 22, 2024 04:55
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

@dasgoll
dasgoll / gist:7b1a796d6e42cb66508bc504bb518f82
Created October 19, 2017 19:41
timeout command on MacOS
brew install coreutils
sudo ln -s /usr/local/bin/gtimeout /usr/local/bin/timeout
@BretFisher
BretFisher / docker-for-mac.md
Last active May 6, 2024 07:28
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@mattes
mattes / gist:a482deab3b1b3a2f1ddc
Created May 20, 2015 04:57
boot2docker top command
tce-load -wi ncurses
TERM=vt100 top -c
@haggen
haggen / README.md
Last active September 11, 2018 03:19
boot2docker on nfs

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@profh
profh / decode_session_cookie.rb
Last active June 23, 2021 13:25
A simple script to decode Rails 4 session cookies
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@christiangenco
christiangenco / hash_array_to_csv.rb
Created June 6, 2014 04:26
Ruby hash array to CSV
class Array
def to_csv(csv_filename="hash.csv")
require 'csv'
CSV.open(csv_filename, "wb") do |csv|
csv << first.keys # adds the attributes name on the first line
self.each do |hash|
csv << hash.values
end
end
end
@tzellman
tzellman / .gitconfig
Created March 1, 2012 09:45
Aliases in my .gitconfig
[alias]
wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\""
unwip = !"git log -n 1 | grep -q -c wip && git reset HEAD~1"
rb = !"git wip;git rebase -i origin/master;git unwip"
pr = !"git fetch;git wip;git rebase --stat origin;git unwip;git heads"
head = !"git log -n1"
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'"
heads = !"git log origin/master.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
fix = commit --amend -C HEAD
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r