Skip to content

Instantly share code, notes, and snippets.

View lexmag's full-sized avatar

Aleksei Magusev lexmag

View GitHub Profile
@wrtsprt
wrtsprt / remove_file_from_git_hist.sh
Created May 18, 2011 09:44
remove file from git history
#!/bin/bash
set -o errexit
# Original from David Underhill @ http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
@nox
nox / atkin.erl
Last active December 20, 2015 04:49
Sieve of Atkin in Erlang with a mutable HiPE bitarray. Forgive me, I was bored.
-module(atkin).
-export([primes_smaller_than/1]).
primes_smaller_than(Limit) ->
primes_smaller_than(Limit, sieve(Limit), []).
primes_smaller_than(0, _, Acc) ->
Acc;
primes_smaller_than(N, Bin, Acc) ->