Skip to content

Instantly share code, notes, and snippets.

@callum-p
callum-p / logstash-cloudwatch.yml
Last active August 24, 2021 21:31
Deploys lambda functions to forward cloudwatch logs to logstash
Description: Deploys lambda functions to forward cloudwatch logs to logstash
Parameters:
coreNetworkingStackName:
Type: String
Resources:
lambdaRole:
Type: "AWS::IAM::Role"
Properties:
@opyate
opyate / commit-msg
Created October 10, 2017 09:33
JIRA code commit msg hook; presumes merges happen on remote (via PR mechanism, etc)
#!/bin/sh
# .git/hooks/commit-msg
test "" != "$(egrep '[A-Z]{3,}-\d+' "$1")" || {
echo >&2 Commit message requires JIRA code.
exit 1
}
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@thillerson
thillerson / gist:0eb01e76f4a1cbdcca7d
Created June 4, 2014 17:38
Easy xcode switching for playing with swift
➜ cat .bash_aliases | grep xcode
alias x5="sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer"
alias x6="sudo xcode-select -switch /Applications/Xcode6-Beta.app/Contents/Developer"
➜ x5
➜ xcrun swift
xcrun: error: unable to find utility "swift", not a developer tool or in PATH
➜ x6
➜ xcrun swift
Welcome to Swift! Type :help for assistance.
1>
@kjunggithub
kjunggithub / gist:8330157
Last active May 30, 2022 03:40
git hubflow cheaetsheet

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone git@github.com:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name
@rgbkrk
rgbkrk / hubdecrypt.sh
Last active April 6, 2022 02:55
Encrypt a (short) file using someone's public key from github
#!/usr/bin/env bash
# HubCrypt
# ========
#
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl +
# your SSH keys). It needs the private key that matches your last public key
# listed at github.com/<user>.keys
#
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"