Skip to content

Instantly share code, notes, and snippets.

@duckpuppy
duckpuppy / sns-to-slack.js
Created August 24, 2018 20:07 — forked from benyanke/sns-to-slack.js
AWS Lambda function for forwarding SNS notifications to Slack
// Added by Ben Yanke
// from https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752
console.log('Loading function');
const https = require('https');
const url = require('url');
// SETUP
// urlToUse = in this environment variable, place the name of another environment variable which contains the key.
// This allows easy dev/prod switching.
@duckpuppy
duckpuppy / function.js
Created August 24, 2018 20:05 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@duckpuppy
duckpuppy / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/**
* Base class for command line applications.
*
* Children can provide functionality in the form of
* <command name> <arguments...>
*
* @author Ben Fagin
* @author Patrick Aikens
*/
class GroovyCLI implements Runnable {
{
"working_dir": "${project_path:${folder}}",
"shell_cmd": "mvn -fae clean install"
}

Dark version

wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`

git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh