Skip to content

Instantly share code, notes, and snippets.

// DEBUG Styles:
#time_of_day_debug {
position: fixed;
padding: .25em;
bottom: 0;
right: 0;
font-size: 10px;
> a {
display:block;
margin: .5em .5em .5em 1.1em;
@amoslanka
amoslanka / Gemfile
Created December 13, 2012 21:19
Sprite Generation and Application in Rails
# etc ...
group :development do
# etc ...
# Sprites:
gem 'sprite-factory'
gem 'rmagick'
gem 'piet' # image optimization
end
@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 / 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 / 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'
@amoslanka
amoslanka / README.md
Last active December 23, 2015 20:39 — forked from eric1234/README.md
@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 ####
###########################
function Player(name, age, handicap, etc) {
this.name = name;
}
// VS.
function Player(name, age, handicap, etc) {
return {
name: name,
age: age,
_.--~~~~~~~---------------._
,=-,.--#####----..--------. `.
,' ,/ _/_ #### :! ` ``.
, ,/ [.[.]-=## :! / ` `.`.
, ,/ /_ )# :! // // ` `.`.
, /7 |_/ # :! // / ` `.`. ___,-
. ; | \___/ :! ; `~`= /
___,--`--( ;_____/__ \____:!__________,-' `. /
__,--' '~~ \ \ __` ______ `.
_,-' _ ____\ \-o . /ZZZZZ/ `.