Skip to content

Instantly share code, notes, and snippets.

View johnclaus's full-sized avatar

John Claus johnclaus

  • The Front Range
View GitHub Profile
@rija
rija / puppet_macosx_rvm
Created February 12, 2012 22:20
Problem loading Puppet libraries on Mac OS X
got these errors on Mac OS X Lion and Puppet 2.7.10:
/usr/bin/puppet:3:in `require': no such file to load -- puppet/util/command_line (LoadError)
from /usr/bin/puppet:3
/usr/sbin/puppetd:3:in `require': no such file to load -- puppet/application/agent (LoadError)
from /usr/sbin/puppetd:3
@freeformz
freeformz / WhyILikeGo.md
Last active October 6, 2022 23:31
Why I Like Go

A slightly updated version of this doc is here on my website.

Why I Like Go

I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.

Goroutines

The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.

@plentz
plentz / nginx.conf
Last active June 26, 2024 04:29
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@aturley
aturley / gist:8302694
Last active April 1, 2016 20:39
BLOGPOST Just Say "No" to "Just

Recently I've been trying to modify the way that I use the word "just" when I'm at work. Merriam Webster offers a few definitions of the word; the one I'm interested in is the one that means "only", "simply", and to a lesser extent "exactly". I've been working on a new project that involves integrating a number of systems, and as I began rolling pieces out I received a lot a questions in the form of "Couldn't you just ...?" These annoyed me at first, but as I thought about it I realized I often asked questions in the same way, so I began to examine the word and the way I use it.

@cmeiklejohn
cmeiklejohn / gist:8346377
Last active January 2, 2016 18:49
Think Distributed Systems Summer School; Providence, RI
Think Distributed Systems Summer School
Providence, RI
Curriculum
Friday (night session, open discussion)
* Background, introductions
* What are you working on in distributed systems?
* Lightning talks on research or open problems
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,
@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

@benbjohnson
benbjohnson / README.md
Created March 3, 2014 03:17
Application-side Interfaces in Go

Application-side Interfaces in Go

By moving the interface to the application-side (application.go), you can still set the implementation-specific configuration details when you instantiate your library structs. If the interface was implemented on the library-side then you would need to provide:

type DB interface {
  Get([]byte) ([]byte, error)
  Put([]byte, []byte) error
  CacheSize() int
 SetCacheSize(int)