Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am astory on github.
  • I am astory (https://keybase.io/astory) on keybase.
  • I have a public key ASC1ENcEP56I69b3H9Yjui1V1JqZNMDrgLi5s7Mu-iR1rgo

To claim this, I am signing this object:

@astory
astory / oseberg_tablet.jscad
Created September 17, 2017 14:28
Oseberg tablet jscad
// title : Oseberg Weaving Tablets
// author : Alec Story
// license : CC by 4.0
// revision : 1
// Based on a blueprint published in _52 WOOD WEAVING TABLETS
// recovered from The Oseberg Ship Burial in Norway - 834 AD_
// by Terri A. Morrison, 1999. Dimensions are ultimately from
// her private correspondance with Dr. Arne Emil Christensen,
// chief curator of the Vikingskipshuset in Oslo, Norway.
@astory
astory / fancy_spool_knitter.jscad
Created May 1, 2016 00:21
3d model for a fancy spool knitter
// Visit https://joostn.github.io/OpenJsCad/processfile.html to turn this into an stl. It's configurable.
// STL of defaults at TODO
function buildDisk(params) {
var disk = CSG.cylinder({
start: [0, 0, 0],
end: [0, 0, params.diskThickness],
radius: params.diskRadius,
resolution: params.resolution
});
// Visit https://joostn.github.io/OpenJsCad/processfile.html to turn this into an stl. It's configurable.
function buildDisk(params) {
var disk = CSG.cylinder({
start: [0, 0, 0],
end: [0, 0, params.diskThickness],
radius: params.diskRadius,
resolution: params.resolution
});
var hole = CSG.cylinder({
@astory
astory / gist:3217202
Created July 31, 2012 13:51
Attempt at git filtering
alec@anyang:~/frenetic/netcore$ git filter-branch --prune-empty --index-filter 'git ls-tree -r --name-only --full-tree $GIT_COMMIT | grep -v "^src" |grep -v "^frenetic.cabal$" |grep -v "mininet-tests" |grep -v "README" |grep -v "^testsuite" |grep -v "^git-changelog" | xargs --verbose git rm --cached -r' -- --all
Rewrite 29838b477ed1eaf96a5e88d93e85288db055e866 (1/1652)git rm --cached -r
usage: git rm [options] [--] <file>...
-n, --dry-run dry run
-q, --quiet do not list removed files
--cached only remove from the index
-f, --force override the up-to-date check
-r allow recursive removal
--ignore-unmatch exit with a zero status even if nothing matched
class BottomPolicy(Policy):
"""Policy that drops everything."""
def __init__(self):
pass
def get_physical_rep(self, switch_map, port_map):
return self
def get_actions(self, packet, loc):
return []
#!/usr/bin/python
################################################################################
# The Frenetic Project #
# frenetic@frenetic-lang.org #
################################################################################
# Licensed to the Frenetic Project by one or more contributors. See the #
# NOTICE file distributed with this work for additional information #
# regarding copyright and ownership. The Frenetic Project licenses this #
# file to you under the following license. #
# #
@astory
astory / gist:3011694
Created June 28, 2012 14:30
compiled_correctly
def eq(p1, p2):
return equiv_modulo(['vlan'], p1, p2)
p, pp, q, qq = Consts('p pp q qq', Packet)
s = Solver()
s.add(ForAll([p, pp],
Implies(forwards(orig, p, pp),
Exists([q, qq], And(And(eq(p, q), eq(pp, qq)),
forwards(result, q, qq))))))
s.add(ForAll([p, pp],
Implies(forwards(result, p, pp),
@astory
astory / build.log
Created May 8, 2012 18:42
Build log for uck
Build (/usr/bin/uck-gui --wait-before-exit) started at 2012-05-08 13:40:14
>> Ubuntu Customization Kit 2.4.5 on Ubuntu 12.04, 3.2.0-24-generic x86_64
Starting CD remastering on Tue May 8 13:40:17 EDT 2012
Customization dir=/home/alec/tmp/customization-scripts
Mounting ISO image...
mount: warning: /home/alec/tmp/remaster-iso-mount seems to be mounted read-only.
Unpacking ISO image...
Unmounting ISO image...
Mounting SquashFS image...
mount: warning: /home/alec/tmp/remaster-root-mount seems to be mounted read-only.
@astory
astory / Makefile
Created May 1, 2012 02:02
Example makefile for data processing
# Makefile for sequence analysis
D3 = 10229609_627E8AAXX_s_1.barcode.G1366_D3.q20l50.fq
D4 = 10229609_627E8AAXX_s_1.barcode.G1300_D4.q20l50.fq
T2 = 10229609_627E8AAXX_s_1.barcode.G1393_T2.q20l50.fq
DIPLOIDS = $(D3) $(D4)
SEQUENCES = $(DIPLOIDS) $(T2)
TEST = test.fq