Skip to content

Instantly share code, notes, and snippets.

@amoslanka
amoslanka / graphite_install.sh
Last active February 2, 2024 00:17
Install StatsD on an Ubuntu box, including creating an upstart service and the option to build a graphite box or configure Librato as a backend.
#
# Assumes an independent box (we'll call this one "graphite")
#
# Stay up to date
sudo apt-get update
sudo apt-get upgrade
# Install git
sudo apt-get install g++ curl libssl-dev -y
@amoslanka
amoslanka / rsyslog.conf
Last active July 8, 2021 07:47
Configuration for rsyslog for Nginx and PHP only. Output to /var/log/loggly and send to Loggly as well.
#################
#### MODULES ####
#################
$ModLoad imuxsock # provides support for local system logging
$ModLoad imfile
###########################
#### GLOBAL DIRECTIVES ####
###########################
@amoslanka
amoslanka / struck-postgres.md
Created August 3, 2012 15:43
Postgres in Struck Development

Postgres in Struck Development

Installation

Option 1: Postgres.app (recommended):

http://postgresapp.com/

Option 2: Install it yourself:
@amoslanka
amoslanka / JSON Root Nodes.md
Last active December 19, 2018 09:27
JSON Root Nodes

Some json configurations will emit a single root node named after the object's type or an abstractable name for the object depending on context. This document outlines the differences and examples of both included and discluded root nodes in JSON responses.

Single Record Requests

Nodes of this type, for request GET foos will respond with this body:

{
  "foo": {
    "bar": "baz"

}

@amoslanka
amoslanka / .gitignore
Last active January 15, 2018 01:42
Simple session-stored auth on Node.js
*node_modules/
.DS_Store
@amoslanka
amoslanka / Berksfile
Last active September 9, 2016 19:59
StatsD/Graphite server on AWS/EC2 using Vagrant, Chef Solo, and Berkshelf
site :opscode
cookbook 'apt'
cookbook 'statsd', git: 'https://github.com/librato/statsd-cookbook.git'
cookbook 'graphite', git: 'https://github.com/hw-cookbooks/graphite.git'
_.--~~~~~~~---------------._
,=-,.--#####----..--------. `.
,' ,/ _/_ #### :! ` ``.
, ,/ [.[.]-=## :! / ` `.`.
, ,/ /_ )# :! // // ` `.`.
, /7 |_/ # :! // / ` `.`. ___,-
. ; | \___/ :! ; `~`= /
___,--`--( ;_____/__ \____:!__________,-' `. /
__,--' '~~ \ \ __` ______ `.
_,-' _ ____\ \-o . /ZZZZZ/ `.
function Player(name, age, handicap, etc) {
this.name = name;
}
// VS.
function Player(name, age, handicap, etc) {
return {
name: name,
age: age,
@amoslanka
amoslanka / README.md
Last active December 23, 2015 20:39 — forked from eric1234/README.md
@amoslanka
amoslanka / Text Substitutions.plist
Last active December 11, 2015 00:12
Text substitutions for emojis and other helpful shortcuts. Drag this onto your OSX text substitutions preferences pane.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>phrase</key>
<string>👎</string>
<key>shortcut</key>
<string>:-1:</string>
</dict>