Skip to content

Instantly share code, notes, and snippets.

View mnemnion's full-sized avatar

Sam Atman mnemnion

  • Eastern Standard Tribe
View GitHub Profile
@jaredatron
jaredatron / events.js
Created February 21, 2013 19:55
Easiest events!
bind: function(){
$.fn.bind.apply($(this), arguments);
},
trigger: function(){
$.fn.trigger.apply($(this), arguments);
}
@jalcine
jalcine / .gitignore
Last active August 8, 2024 07:32
Getting libuv and zeromq working together (polling setup)
build
@alnsn
alnsn / phash2.lua
Last active January 11, 2019 05:30
Lua module for BDZ perfect hash
-- Building block for generating a perfect not order preserving
-- non-minimal hash.
--
-- For a keyset of size N, it builds a random bipartite graph of
-- size N and order 2 * math.floor(1.0625 * N).
-- With a good probability the graph is acyclic and it's possible
-- to select one vertex from each edge/key that is guaranteed to
-- be unique. Vertices are selected by comparing two bits in
-- a bitset that has the same size as the order of the graph.
--
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@karlseguin
karlseguin / test_runner.zig
Last active November 11, 2024 21:44
Custom Zig Test Runner, better ouput, timing display, and support for special "tests:beforeAll" and "tests:afterAll" tests
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
// .target = target,
// .optimize = optimize,
// .test_runner = "test_runner.zig", // add this line
// .root_source_file = b.path("src/main.zig"),
// });
const std = @import("std");
const builtin = @import("builtin");