Skip to content

Instantly share code, notes, and snippets.

View ralph-tice's full-sized avatar

Ralph Tice ralph-tice

  • Kentik
  • Texas
View GitHub Profile
@coderanger
coderanger / README.md
Last active August 29, 2015 13:56
Command to run depsolver

To use this snippet first replace the _default in the URL with your environment name if you are using somethign other than the global default. Next in the run list, replace ... with your cookbook names. Unlike other run lists, you cannot have roles here, and you don't use the 'recipe[foo]' syntax, just 'foo'.

@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@selenamarie
selenamarie / prod_postgres.md
Last active March 15, 2019 05:12
An Ideal Postgres Environment

Ideal Postgres environment

Documentation

  • Documented replication topology
  • Documented network topology
  • Documented interface topology - including users, passwords, connection estimates, load balancers, connection proxies
  • Documented procedure, schedule for failover and testing
  • Documented procedure, schedule for disaster recovery and testing
@deserat
deserat / gist:8245275
Last active January 2, 2016 03:39
Node JS Benchmarks Amazon AWS vs Joyent

The script:

var http = require('http')
var fs = require('fs')


http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'})
  res.end("hello world")
}).listen(3000);
@debasishg
debasishg / gist:8172796
Last active May 7, 2024 22:18
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
@abhin4v
abhin4v / astar.hs
Last active November 24, 2022 06:36
A* (A star) search in haskell
import qualified Data.PQueue.Prio.Min as PQ
import qualified Data.HashSet as Set
import qualified Data.HashMap.Strict as Map
import Data.Hashable (Hashable)
import Data.List (foldl')
import Data.Maybe (fromJust)
astarSearch :: (Eq a, Hashable a) => a -> (a -> Bool) -> (a -> [(a, Int)]) -> (a -> Int) -> Maybe (Int, [a])
astarSearch startNode isGoalNode nextNodeFn heuristic =
astar (PQ.singleton (heuristic startNode) (startNode, 0))
@deniszh
deniszh / whisper-cyanite.py
Last active February 16, 2023 03:39
Quick and dirty script to migrate Graphite from whisper to cyanite
#!/usr/bin/env python
import os
import mmap
import struct
import signal
import optparse
import cql
try:
@dctrwatson
dctrwatson / gist:7763943
Created December 3, 2013 04:37
RAID adapter blocking due to a dead drive causing issues with Cassandra and pycassa
[21174748.746874] INFO: task jsvc:9672 blocked for more than 120 seconds.
[21174748.749104] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[21174748.751489] jsvc D ffffffff81806240 0 9672 9639 0x00000000
[21174748.751497] ffff8803436abe08 0000000000000082 ffff8800850bd000 ffffffffffffff98
[21174748.751516] ffff8803436abfd8 ffff8803436abfd8 ffff8803436abfd8 00000000000137c0
[21174748.751534] ffff88032bf39700 ffff8805fe535c00 ffff880622cf40c0 ffff8805fe535c00
[21174748.751553] Call Trace:
[21174748.751563] [<ffffffff8165ba6f>] schedule+0x3f/0x60
[21174748.751573] [<ffffffff8165d86d>] rwsem_down_failed_common+0xcd/0x170
[21174748.751583] [<ffffffff8165d923>] rwsem_down_write_failed+0x13/0x20
@panzi
panzi / mandelbrot.c
Created November 10, 2013 04:40
gcc -lm -Wall -Werror -Wextra -pedantic -std=c99 -O3 -o mandelbrot mandelbrot.c original: http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/
#include <stdio.h>
#include <complex.h>
#define dc double complex
dc
Y(dc
V,
dc B,dc c){
return
(cabs (V)<6)?(c?Y(V *V+
B,B,c-1):c):(2+c-4*cpow
@al3xandru
al3xandru / gist:7283595
Last active December 27, 2015 06:39
Ricon West 2013 : Full day streams jump list
## Day 1 - Track 1 ##
00:10:00 Pat Helland: Keystone - Between a ROC and a SOFT place
01:12:18 Lindsey Kuper: LVars: Lattice-based Data Structures for Deterministic Parallelism
02:11:54 Eric Redmond: Yokozuna!
04:10:50 Justin Shoffstall & Charlie Voiselle: The Seven-Layer Burrito; Troubleshooting a Distributed Database in Production
05:11:00 Peter Bailis: Bad as I wanna be - Coordination and Consistency in Distributed Databases
06:13:24 Joseph Blomstedt: Bringing Consistency to Riak (Part 2)
07:16:22 Lightning talks (_nb_: you **must** see @tsantero!)