Skip to content

Instantly share code, notes, and snippets.

View patcon's full-sized avatar

Patrick Connolly patcon

View GitHub Profile
@easherma
easherma / did_i_do_that.md
Last active January 23, 2018 16:57
Did I Do That?

Did I do that?

Problem

Reduplication of work is very common in both the civic tech and open source space.

For lots of reasons (expand).

To address this, in the community it is often proposed to have a list of resources or existing projects. While an obvious solution, it has several fundamental challenges, such as:

  • It is hard for one or a small group of people to know everything that is going on
  • Someone has to maintain this resource or else relevance slowly declines and leads to stagnation
@twolfson
twolfson / README.md
Last active November 21, 2023 11:43
Audit logging via sequelize

We prefer to have audit logging in our services that leverage databases. It gives us clarity into sources of where ACL issues might originate as well as gives us a general timeline of activity in our application.

Audit logging is tedious to set up so this gist contains our latest iteration of audit logging support for a sequelize based service.

@mikoim
mikoim / nginx.conf
Created October 28, 2016 21:22
Split RTMP Stream with nginx-rtmp-module
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
chunk_size 8192;
@rokotyan
rokotyan / .block
Last active December 3, 2024 13:10
Export SVG D3 visualization to PNG or JPEG
license: mit
@elipousson
elipousson / timelinejs-include.md
Created February 16, 2016 00:27
TimelineJS include for Jekyll

{% include timelinejs.html json-source="" %}

@patcon
patcon / README.md
Last active May 10, 2022 23:24
A parser for the City of Toronto subject thesaurus/taxonomy, helpful for searching tmmis with internal city tags (updated 2021-02-24)

@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@chriseth
chriseth / BinarySearch.sol
Last active August 3, 2022 19:22
Verified binary search in sorted array
contract BinarySearch {
///@why3
/// requires { arg_data.length < UInt256.max_uint256 }
/// requires { 0 <= to_int arg_begin <= to_int arg_end <= arg_data.length }
/// requires { forall i j: int. 0 <= i <= j < arg_data.length -> to_int arg_data[i] <= to_int arg_data[j] }
/// variant { to_int arg_end - to_int arg_begin }
/// ensures {
/// to_int result < UInt256.max_uint256 -> (to_int arg_begin <= to_int result < to_int arg_end && to_int arg_data[to_int result] = to_int arg_value)
/// }
/// ensures {
anonymous
anonymous / RevokableOwned
Created October 9, 2015 20:08
Created using soleditor: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity#gist=
import "owned";
contract RevokableOwned is owned {
address previousOwner;
uint8 revokableV;
bytes32 revokableR;
bytes32 revokableS;
// In order to make a contracts ownership revokeable you must
@rtt
rtt / tinder-api-documentation.md
Last active May 6, 2025 12:58
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)