Skip to content

Instantly share code, notes, and snippets.

@heme
heme / slack
Created March 23, 2018 12:49
API Gateway Body Mapping Template To Slack
{
"text": "```$util.escapeJavaScript($input.json('$'))```",
"username": "message from API Gateway",
"mrkdwn": true
}
@heme
heme / aws_bookmarks.html
Created March 8, 2018 02:14
AWS Bookmarks Import for Chrome
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>AWS</TITLE>
<H1>AWS</H1>
<DL><p>
<DT><H3 ADD_DATE="1414431870" LAST_MODIFIED="1520472836" PERSONAL_TOOLBAR_FOLDER="true">AWS</H3>
<DL><p>
@heme
heme / docker-machine-ip.sh
Created January 21, 2016 03:44
Sticky IP for docker machines
echo "kill `more /var/run/udhcpc.eth1.pid`\nifconfig eth1 192.168.99.101 netmask 255.255.255.0 broadcast 192.168.99.255 up" | docker-machine ssh MACHINE_NAME sudo tee /var/lib/boot2docker/bootsync.sh > /dev/null
@heme
heme / SalesForceID_15_to_18
Last active August 29, 2015 14:21
Convert a 15 Character SalesForce ID to 18 Character ID
// Source: https://developer.salesforce.com/forums/ForumsMain?id=906F00000009BWRIA2
var id=prompt('Enter a 15 char ID:','');
id = id.replace(/\"/g, '');
if (id.length != 15) {
alert('Not 15 Characters');
} else {
var suffix = '';
for (var i = 0; i < 3; i++) {
var flags = 0;
for (var j = 0; j < 5; j++) {
@heme
heme / apache-tomcat-ajp-boot.md
Last active April 29, 2020 10:44
OSX: Apache & Tomcat Auto Start Port 80 thru AJP
@heme
heme / verify
Created August 30, 2014 15:06
Verify
Verifying that +heme is my Bitcoin username. You can send me #bitcoin here: https://onename.io/heme
@heme
heme / delRoutes.bat
Created August 1, 2014 20:39
Firewall Freedom thru WiFi (clean up)
@ECHO OFF
REM twitter.com
ROUTE DELETE 199.16.156.0
REM twimg.com
ROUTE DELETE 210.163.219.24
REM pbs.twimg.com
REM si0.twimg.com
@heme
heme / addRoutes.bat
Created August 1, 2014 20:37
Firewall Freedom thru WiFi
@ECHO OFF
REM CHANGE: XXX.XXX.XXX.XXX TO: ipconfig -> WiFi Interface-> Default Gateway
REM twitter.com
ROUTE -p ADD 199.16.156.0 MASK 255.255.255.0 XXX.XXX.XXX.XXX if 12
REM twimg.com
ROUTE -p ADD 210.163.219.24 MASK 255.255.255.255 XXX.XXX.XXX.XXX if 12