Skip to content

Instantly share code, notes, and snippets.

View lenards's full-sized avatar

Andrew Lenards lenards

  • Tucson, AZ
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@v0lkan
v0lkan / nginx.conf
Last active April 2, 2024 18:25
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@miku
miku / README.md
Last active July 14, 2022 17:21
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone git@github.com:AKSW/OntoWiki.git

@whizark
whizark / class-naming-convention.md
Last active April 23, 2024 06:25
HTML/CSS Class Naming Convention #html #css #sass
@ewdurbin
ewdurbin / subnetme.py
Last active August 29, 2015 14:05
subnetted
import sys
import itertools
from netaddr import IPNetwork
from netaddr import cidr_merge
AWS_RESERVED_IPS = 5
ALLOCATIONS = {
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
encoded_field = res[field].encode('utf-8')
print '\n{0}:\n{1}'.format(field, encoded_field)
@sokratisg
sokratisg / pdns-pipebackend.py
Created April 7, 2014 22:38
PowerDNS PipeBackend python example
#!/usr/bin/python -u
import sys, os, time
import random
class DNSLookup(object):
"""Handle PowerDNS pipe-backend domain name lookups."""
ttl = 30
@clay-whitley
clay-whitley / export_processor.md
Last active April 5, 2017 04:53
km-export-processor Documentation

km-export-processor gem

The purpose of this gem is to consume the JSON that KISSmetrics exports to an S3 bucket, and transform it in a variety of useful ways.

The core features are:

  • JSON compiler : Aggregates all KISSmetrics JSON files in a directory, into a single (nonstandard) file.
  • JSON to JSON converter : Converts a nonstandard JSON file into standard format.
  • JSON to CSV converter : Converts a nonstandard JSON file into a CSV file, where each row is an event/property/alias.
  • Reimporter : Takes a nonstandard JSON file, and an API key, and sends the data in the JSON file to the product using the KMTS gem.
@lenards
lenards / gist:7340034
Last active December 27, 2015 14:19 — forked from bhardin/gist:7339955
How @ messages in Hipchat should be used

The @ Symbol in Hipchat

At KISSmetrics our team is distributed around the global in 5 different timezones. When we interview candidates a common question asked is how do we like working remotely from one another. We love it. We use Hipchat as our water cooler, breakroom, and discussion area.

However, there is one thing in Hipchat that needs to be explained. By default, Hipchat will make a noise and bounce in your dock anytime a message is sent. This can become annoying during the work day since Hipchat is used as a water cooler and most of the stuff discussed is not mission critical. You are able to turn this functionality off, and most of us do. But this brings up the notification when someone is @ mentioned.

The dreaded @ symbol. In Hipchat, anytime someone mentions you with your defined @ handle the dock bounces and a sound goes off. This means that someone is attempting to bring something to your attention (and this is likely to be an urgent matter). There is also an @all that will ping ever

@ferd
ferd / app_deps.erl
Created September 23, 2012 05:33
Quick escript to generate a visualization of app dependencies in Erlang/OTP.
%%% Run with 'escript app_deps.erl'
%%% Change the path in filelib:wildcard/1 as required to capture all
%%% your dependencies.
%%%
%%% Rectangular nodes will represent library apps (no processes involved)
%%% and the circular nodes will represent regular apps. An arrow going from
%%% 'A -> B' means 'A depends on B'.
%%%
%%% This script depends on graphviz being present on the system.
-module(app_deps).