Skip to content

Instantly share code, notes, and snippets.

💭
We wanted flying cars, instead we got GitHub status

Michael Klishin michaelklishin

💭
We wanted flying cars, instead we got GitHub status
Block or report user

Report or block michaelklishin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@samuelclay
samuelclay / radix_trie.clj
Created Jan 22, 2013
A Radix Trie (aka PATRICIA trie) implemented in Clojure. For my JavaScript implementation, see this interactive JS fiddle: http://jsfiddle.net/jCYAw/
View radix_trie.clj
(ns radix
(:require [clojure.string :as string]))
(use 'clojure.java.io)
(use 'clojure.pprint)
(println "Loading names... ")
(time (def names
(with-open
[rdr (reader
"/usr/share/dict/ProperNames")]
@coderoshi
coderoshi / gist:3729593
Last active Jun 19, 2019
A Very Short Guide to Writing Guides
View gist:3729593

A Very Short Guide to Writing Guides

This is just a few thoughts on the topic of writing technical guides. This was intended for Basho's engineering team, but this may apply to open source projects in general.

Audience

It's commonly preached that the first step in writing is to identify your audience; to whom are you writing? This is the most well known, most repeated, and most overlooked step of writing in general and technical writing in particular. Take this document, for example. My audience is technical people who need to communicate technical information, and not teen girls, so I shy away from images of pop icons riding unicorns. I use jargon and words like "identify" rather than "peep this".

Pronouns

View pinstats.go
//Pinstats.
//Fetch the pinterest front page. Extract all the name elements
//and keep track of the gender of what you find
package main
import (
"code.google.com/p/go-html-transform/html/transform"
"fmt"
@eliaslevy
eliaslevy / gist:3042381
Created Jul 3, 2012
High level AMQP blocking publish method
View gist:3042381
# Helper method that publishes a message to an exchange and waits for a
# broker acknowledgement using RabbitMQ's publisher confirmation extension.
#
# Confirm mode must already be enabled in the channel. You can turn
# confirm mode on using channel.confirm_select. You must only do this
# once.
#
# It also raises an error if you use the mandatory and/or immediate
# options, and these constrains cannot be meet by the broker.
#
@michaelklishin
michaelklishin / latency.txt
Created Jun 19, 2012 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
View gist:2851251
#!/bin/sh
#
# Downloads and installs the startssl CA certs into the global java keystore
# Author: Klaus Reimer <k@ailis.de>
#
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
View 1.sql
# --- !Ups
CREATE TABLE users(
email VARCHAR(255) NOT NULL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE subjects(
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
title LONGTEXT NOT NULL,
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012
PostgreSQL as JSON Document Store
View postsql.sql
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@paulmillr
paulmillr / active.md
Last active Jul 10, 2019
Most active GitHub users (by contributions). http://twitter.com/paulmillr
View active.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Tue, 06 Dec 2016 17:06:46 GMT till Wed, 06 Dec 2017 17:06:46 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
  .filter(user => user.followers > 1000)
@jch
jch / rabbitmq-install-osx.md
Created Apr 28, 2012
Troubleshooting RabbitMQ installation on OSX via homebrew
View rabbitmq-install-osx.md

Troubleshooting RabbitMQ installation on OSX via homebrew

brew update
brew install rabbitmq

To see if rabbitmq is running after following the installation instructions:

launchctl list | grep rabbit
> 48303	-	homebrew.mxcl.rabbitmq
You can’t perform that action at this time.