Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Hughes hughes

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

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 Aug 29, 2015 — forked from mbostock/.block
d3 pack layout with custom group padding
View README.md

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

View README.md

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 Aug 29, 2015
chargeTest
View _.md
@hughes
hughes / _.md
Created Mar 27, 2015
grid-constrained force layout
View _.md
@hughes
hughes / _.md
Last active Aug 29, 2015
grid-constrained force layout
View _.md
@hughes
hughes / _.md
Last active Aug 29, 2015
grid-test
View _.md
@hughes
hughes / _.md
Created Feb 20, 2015
struct_test
View _.md
View gist:069e89f5ec699905f30d
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)
View gist:014103d2b0e097329e1c
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)