Skip to content

Instantly share code, notes, and snippets.

View originalhat's full-sized avatar
👾
L I M I T L E S S

Devin Brown originalhat

👾
L I M I T L E S S
View GitHub Profile
@originalhat
originalhat / mc-server.md
Last active October 8, 2015 03:30
EC2 Minecraft Server

EC2 Minecraft Configuration

Initial Setup

yum install java-1.8.0-openjdk.x86_64

yum erase java-1.7.0-openjdk

wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar

@originalhat
originalhat / delete_branches_older_than.sh
Last active September 11, 2015 15:46 — forked from antonio/delete_branches_older_than.sh
Script to delete branches older than a certain date
#!/bin/sh
date=$1
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
if [[ "$(git log $branch --since $date | wc -l)" -eq 0 ]]; then
if [[ "$branch" =~ "origin/" ]]; then
local_branch_name=$(echo "$branch" | sed 's/^origin\///')
if [[ "$DRY_RUN" -eq 1 ]]; then
echo "git push origin :$local_branch_name"
@originalhat
originalhat / ruby-func-ref.md
Last active August 29, 2015 14:20
Ruby Functional Pocket Reference

Functional Ruby Pocket Reference

Flatten array of hashes and assign opposing k/v pairs.

foo = [{"title"=>"candy", "amount"=>"1.00"}]
foo.map { |k, v| Hash[k["title"], k["amount"]] }.reduce({}, :merge)
# => {"candy"=>"1.00"}
@originalhat
originalhat / polylogging.md
Last active August 29, 2015 14:18
logging from multiple hosts (and some other goodies)

Multiple Host Logging [Multitail]

Install multitool via homebrew.

cf. vanheusden.com/multitail

Basic Logging

Logging stuff from multiple (2) hosts.

Roasted "Cacaoflower"

Arguments

  • 1 head of cauliflower
  • 2 tbsp coconut oil
  • 1 tsp paprika
  • 1 tsp unsweetened cacao / chocolate powder
  • 1/2 tsp garlic powder
  • 1/2 tsp salt
@originalhat
originalhat / gist:78196104b3b93800547d
Last active August 29, 2015 14:17
Uncle Brown's Ultimate Smoothie

Uncle Brown's Ultimate Smoothie

Arguments

  1. handful of fresh cilantro
  2. handful of fresh parsley
  3. fresh ginger root
  4. fresh turmeric root
  5. 1 tbsp hemp seed
  6. 1 tbsp chia seed
@originalhat
originalhat / gist:c30aafa50baf7c264955
Last active August 29, 2015 14:16
delete remote git branches

Delete All Remote Branches

git branch -r | awk -F/ '/\/dgb/{print ":" $2 "/" $3 "/" $4}' | xargs git push origin
@originalhat
originalhat / gabes-baller-chicken.md
Last active December 12, 2015 22:45
Gabe’s Baller Caramel Chicken

Gabe’s Baller Caramel Chicken

Arguments

  • 3/4 cup dark brown sugar

  • 1/3 cup fish sauce

  • 1/3 cup rice vinegar

var ModifierGroup = (function() {
  function ModifierGroup(_params) {
    if (_params != undefined) {
      this.name            = _params.name;
      this.modifiers       = _params.modifiers;
      this.credit          = _params.credit;
      this.max             = _params.max;
      this.min             = _params.min != null ? _params.min : 0;
      this.maxPrice        = _params.maxPrice;
@originalhat
originalhat / quotes.md
Last active August 29, 2015 14:11
quotes

Sentiment without action is the ruin of the soul. - Edward Abbey


True knowledge is knowing that you know nothing. - Plato


>The man who becomes obesessed with succeeding has already failed.