Skip to content

Instantly share code, notes, and snippets.

Living the dream

Clint Tyler cdtweb

Living the dream
View GitHub Profile
ukcloudpro / ukcloudpro-lambda-sns-slack.js
Created Apr 23, 2017
AWS Lambda node.js code to pass SNS messages to Slack Webhook
View ukcloudpro-lambda-sns-slack.js
var https = require('https');
var util = require('util');
var SLACK_PATH = process.env.SLACK_PATH;
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
slider23 /
Last active Jan 23, 2021
VPS install bash script for Ubuntu 16.04
# =================== YOUR DATA ========================
gsherwood / ruleset.xml
Created Dec 5, 2014
PSR2 with tabs instead of spaces
View ruleset.xml
<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
ksred / bash IO example
Last active May 31, 2018
Bash example showing basic input and output
View bash IO example
#! /bin/bash
#A comment stating what this program is about
#Taking input, showing output
echo “Please enter in a variable”
echo “The variable you entered is: $VARIABLE
#Taking in arguments
#Usage: ./ var1 var2 var3
plentz / nginx.conf
Last active Feb 25, 2021
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
jasonamyers / supervisord.conf
Created Feb 24, 2013
A sample supervisor config file
View supervisord.conf
; Sample supervisor config file.
; For more information on the config file, please see:
; Note: shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
file=/tmp/supervisor.sock ; (the path to the socket file)
naholyr /
Created Dec 13, 2012
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.


Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
brandonb927 /
Last active Feb 2, 2021
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
maxrice / us-state-names-abbrevs.php
Created May 23, 2012
US State Names & Abbreviations as PHP Arrays
View us-state-names-abbrevs.php
/* From */
$us_state_abbrevs_names = array(
jessedearing / gist:2351836
Created Apr 10, 2012 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
View gist:2351836
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key
openssl rsa -in -out myssl.key