Skip to content

Instantly share code, notes, and snippets.

View miah's full-sized avatar
🍕
Dreaming of pizza.

Miah Johnson miah

🍕
Dreaming of pizza.
View GitHub Profile
@jhass
jhass / RubyOnArch.md
Last active June 10, 2024 08:54
My Ruby setup on Archlinux

Ruby on Archlinux

I thought I would document my setup, since it's somewhat non-standard but working quite well for me.

What this does

  • Install major Ruby versions at their latest patch release
  • Allow to switch between them seamlessly
  • Use chruby
  • Encourage bundler usage
https://www.youtube.com/watch?v=hIqEHc9_Bwo
https://www.youtube.com/watch?v=PwedoZZHadY
https://www.youtube.com/watch?v=tM_HRwqKzFk
https://www.youtube.com/watch?v=zufLcLT8fmI
https://www.youtube.com/watch?v=hdNHKUCbNmE
https://www.youtube.com/watch?v=4Ge2h8Apgd8
https://www.youtube.com/watch?v=wBkvzbw5cDM
https://www.youtube.com/watch?v=-8KmEO0hrz0
https://www.youtube.com/watch?v=gBLalqndgYQ
https://www.youtube.com/watch?v=QgmTsvIMD-k
@rafrombrc
rafrombrc / message_types.md
Last active October 26, 2016 20:14
Heka internal message types
  • heka.counter-output: Generated by CounterFilter. Usually picked up by a LogOutput for writing to stdout.

  • heka.plugin-report: Used inside the reporting infrastructure for plugins to provide report data to the dashboard, typically not injected into the router at all.

  • heka.input-report: Used inside the reporting infrastructure for the input recycle chan to provide report data to the dashboard, typically not injected into the router at all.

  • heka.inject-report: Used inside the reporting infrastructure for the inject recycle chan to provide report data to the dashboard, typically not injected into the router at all.

  • heka.router-report: Used inside the reporting infrastructure for the router to provide report data to the dashboard, typically not injected into the router at all.

@kimor79
kimor79 / email
Created June 4, 2014 15:52
openldap plugin collectd original email
Hi,
I've managed to cobble together an openldap plugin to monitor the various
counters from an openldap server. This is based mainly off of the apache and
mysql plugins. I am not a c programmer so apologies if the code is horrible.
Two things I need help on are:
1) Initializing the global ldap options. I don't know where this would go.
@fnichol
fnichol / unfuck-vmware-net.sh
Created February 13, 2014 19:32
"Fix" VMware Network
#!/usr/bin/env bash
set -e
[ -n "$DEBUG" ] && set -x
banner() { printf -- "-----> $*\n"; }
banner "Restarting VMware networking"
banner "Stoping networking"
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
@fdv
fdv / elasticsearchreallocator.sh
Last active January 4, 2016 21:59
In case your Elasticsearch cluster goes red and refuses to assign some shards anymore...
# Seems you have 2 solutions left:
# - either you trash the whole index and reindex. Good luck, have fun
# - or you manually reallocate the whole thing
#
# Guess what I'll pick up
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [
{
"allocate": {
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@untergeek
untergeek / ls-es-mapping.json
Last active March 16, 2019 12:38
Logstash v1.2+ Elasticsearch Mapping Template
{
"template" : "logstash-*",
"settings" : {
"index.refresh_interval" : "5s",
"analysis" : {
"analyzer" : {
"default" : {
"type" : "standard",
"stopwords" : "_none_"
}
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@dysinger
dysinger / easy-ubuntu-openvpn.sh
Created August 28, 2013 18:22
Create a VPN on EC2 in 30 seconds
#!/bin/sh
# linux firewall/forwarding
modprobe iptable_nat
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.10.10.1/2 -o eth0 -j MASQUERADE
# install openvpn
apt-get update && apt-get install -y openvpn
cd /etc/openvpn/
INSTANCE=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
openvpn --genkey --secret ${INSTANCE}.key