Skip to content

Instantly share code, notes, and snippets.

@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active June 6, 2025 20:58
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
@zxbodya
zxbodya / S3-CORS-config.xml
Last active April 6, 2024 03:40
Client side uploads to s3, with pre-signed upload form (PHP/JS)
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>HEAD</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
@staltz
staltz / introrx.md
Last active August 15, 2025 20:30
The introduction to Reactive Programming you've been missing
@ipmb
ipmb / nginx.conf
Created October 22, 2014 16:31
Hack to put Google auth in front of Kibana and ES
upstream elasticsearch {
# google auth proxy -> elasticsearch
server 127.0.0.1:9201;
}
server {
root /path/to/kibana;
# insert standard Nginx boilerplate...
@husobee
husobee / validation-main.go
Created January 8, 2016 20:07
input validation sanely
package main
import (
"encoding/json"
"errors"
"net/http"
"github.com/asaskevich/govalidator"
)
@vagelim
vagelim / kafka.tf
Created June 23, 2016 15:25
Terraform for Kafka on DigitalOcean
resource "digitalocean_droplet" "kafka" {
image = "ubuntu-14-04-x64"
name = "${var.machine_name}"
region = "nyc2"
size = "4gb"
private_networking = true
ssh_keys = [
"${var.ssh_fingerprint}"
]
@travisjeffery
travisjeffery / influxdb-setup.md
Last active March 17, 2024 15:38
Guide to setting up InfluxData's TICK stack

Guide to setting up InfluxData's TICK stack

InfluxData's T.I.C.K. stack is made up from the following components:

Component Role
Telegraf Data collector
InfluxDB Stores data
Chronograf Visualizer