Skip to content

Instantly share code, notes, and snippets.

View jdavis's full-sized avatar
💾

Josh Davis jdavis

💾
View GitHub Profile
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much

Keybase proof

I hereby claim:

  • I am sralmai on github.
  • I am sralmai (https://keybase.io/sralmai) on keybase.
  • I have a public key whose fingerprint is F4EA E199 41C4 783D 1D40 218F 7013 5A1C 0989 8045

To claim this, I am signing this object:

install.packages("expm")
library(expm)
#If you have 5000 people, what are the chances every birthday is represented at least once?
#method taken from http://mathforum.org/library/drmath/view/56679.html , coded for general solution
#number of days over which people are randomly distributed
n = 365
#Set up an n*n transition matrix.
@takeshixx
takeshixx / hb-test.py
Last active November 6, 2024 06:58
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@XVilka
XVilka / TrueColour.md
Last active October 29, 2024 09:43
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@ivoarch
ivoarch / zenburn.py
Last active July 18, 2022 00:40
Zenburn like colorscheme for https://github.com/hut/ranger .
# Ivaylo Kuzev <[email protected]>, 2014
# Zenburn like colorscheme for https://github.com/hut/ranger .
# default colorscheme.
# Copyright (C) 2009-2013 Roman Zimbelmann <[email protected]>
# This software is distributed under the terms of the GNU GPL version 3.
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *
anonymous
anonymous / TestGraph.java
Created November 19, 2013 02:28
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.equalTo;
import org.junit.Test;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collection;
import edu.iastate.cs311.f13.hw6.IGraph;
@hadley
hadley / curriculum.md
Created September 27, 2013 20:24
My first stab at a basic R programming curriculum. I think teaching just these topics without overall motivating examples would be extremely boring, but if you're a self-taught R user, this might be useful to help spot your gaps.

Notes:

  • I've tried to break up in to separate pieces, but it's not always possible: e.g. knowledge of data structures and subsetting are tidy intertwined.

  • Level of Bloom's taxonomy listed in square brackets, e.g. http://bit.ly/15gqPEx. Few categories currently assess components higher in the taxonomy.

Programming R curriculum

Data structures

@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
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.