Skip to content

Instantly share code, notes, and snippets.

View hughes's full-sized avatar

Matt Hughes hughes

View GitHub Profile
@hughes
hughes / README.md
Last active August 29, 2015 14:23
d3 pack layout with custom group padding, demo 2

The padding parameter previously was constant across the layout, and required a second pass of d3_layout_packSiblings.

With this change, it is possible to specify padding on any node, even group nodes. This value is added to the outer radius of the node when packing the nodes

@hughes
hughes / README.md
Last active August 29, 2015 14:23 — forked from mbostock/.block
d3 pack layout with custom group padding

The padding parameter previously was constant across the layout, and required a second pass of d3_layout_packSiblings.

With this change, it is possible to specify padding on any node, even group nodes. This value is added to the outer radius of the node when packing the nodes

@hughes
hughes / README.md
Last active August 29, 2015 14:19 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@hughes
hughes / _.md
Last active August 29, 2015 14:18
chargeTest
@hughes
hughes / _.md
Created March 27, 2015 22:42
grid-constrained force layout
@hughes
hughes / _.md
Last active August 29, 2015 14:17
grid-constrained force layout
@hughes
hughes / _.md
Last active August 29, 2015 14:15
grid-test
@hughes
hughes / _.md
Created February 20, 2015 19:11
struct_test
2014-11-20T01:23:29.020776
login attempt: sh ('111.248.112.58', 43366)
2014-11-20T01:23:36.252145
login attempt: root sh ('111.248.112.58', 43370)
2014-11-20T01:23:43.476545
login attempt: admin sh ('111.248.112.58', 43371)
2014-11-20T01:23:50.702848
login attempt: dreambox sh ('111.248.112.58', 43374)
2014-11-20T01:23:57.927477
login attempt: vizxv sh ('111.248.112.58', 43375)
from passlib.apps import custom_app_context as pwd_context
class User(db.Model):
# ...
def set_password(self, password):
self.password_hash = pwd_context.encrypt(password)
def verify_password(self, password):
return pwd_context.verify(password, self.password_hash)