Skip to content

Instantly share code, notes, and snippets.

View tsnow's full-sized avatar

Tim Snowhite tsnow

  • Palantir
  • Washington, DC
View GitHub Profile
@imjasonh
imjasonh / markdown.css
Last active May 24, 2024 22:56
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@mtnygard
mtnygard / gist:06fe9aa8e598f41b61a9
Created February 14, 2015 17:29
Mark Burgess's book stack on Complexity
- Information and the Nature of Reality, Davies and Gregersen
- Swarm Intelligence, Bonabeau, Dorigo, Theraulaz
- Chaos, ed. Arun V. Holden
- Linked, Baraboa
- The Origins of Order, Kauffman
- Investigations, Kauffman
- Emergence, Steven Johnson
- Elements of Information Theory, Cover, Thomas
- The End of Certainty, Prigogine
- Physical Fluid Dynamics, Tritton
@nathancarnes
nathancarnes / gist:9cb9e3cf21dccace3a2e
Created February 10, 2015 00:25
An amazing library for feature flags in Rails
# Just put this into lib/, and add your methods!
# Usage: Features.your_feature_name?
class Features
# Admin-only features? We've got that!
def self.reticulate_splines?
current_user && current_user.admin?
end
# Don't want to deploy to flip it on or off? It supports that!
@egonelbre
egonelbre / astar_nodequeue.go
Last active June 29, 2023 09:43
Go A* implementation
package astar
import "container/heap"
type NodeQueue []Node
func NewNodeQueue() NodeQueue {
return make(NodeQueue, 0, 1000)
}
(defmacro count-macro-expansions (&body body)
"Count the number of macro expansions required to execute
BODY. Return two values: the result of executing BODY and the
number of expansions."
(let ((closures (gensym "CLOSURES-")))
`(let* ((,closures
(funcall
(compile nil
`(lambda ()
(let ((count 0))
@mislav
mislav / OpenSSL fix.md
Last active June 8, 2023 07:48
Fix OpenSSL certificate errors on Ruby 2.0

The reason why you might get certificate errors in Ruby 2.0 when talking HTTPS is because there isn't a default certificate bundle that OpenSSL (which was used when building Ruby) trusts.

Update: this problem is solved in edge versions of rbenv and RVM.

$ ruby -rnet/https -e "Net::HTTP.get URI('https://github.com')"
net/http.rb:917:in `connect': SSL_connect returned=1 errno=0 state=SSLv3
  read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

You can work around the issue by installing a certificate bundle that you trust. I trust Mozilla and curl.

@mbbx6spp
mbbx6spp / README.md
Last active December 12, 2015 08:49
This is the latter part of the output of executing `traceroute 216.81.59.173`. Starts at my hop 11.

Traceroute Fun

Just in case it doesn't last, if you scroll to the bottom of this README.md you can see the partial output of my traceroute to 216.81.59.173 today (2013-02-09). However, if you want to go on your own adventure just type: traceroute 216.81.59.173.

A

B

C

@ralph-tice
ralph-tice / gist:4253069
Last active October 13, 2015 20:38
netflix edda install/run updated 5/7
sudo yum install git
#need IAM credentials for read for all services, see https://github.com/Netflix/edda/wiki/AWS-Permissions
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_KEY=xxx
export JAVA_OPTS="-XX:MaxPermSize=256M -Xmx1g"
git clone git://github.com/Netflix/edda.git
cd edda
./gradlew build
cd ..
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.8.tgz
@cwise
cwise / resque.sh
Created January 8, 2012 17:53
Rewritten /engineyard/bin/resque
#!/bin/sh
#
# This script starts and stops the Resque daemon
# This script belongs in /engineyard/bin/resque
#
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH
CURDIR=`pwd`
usage() {