Skip to content

Instantly share code, notes, and snippets.

View jesseflorig's full-sized avatar

Jesse Florig jesseflorig

View GitHub Profile

Personal Device Setup

Windows

route ADD 192.168.10.54 MASK 255.255.255.255 192.168.0.248

Linux

sudo ip route add 192.168.10.54/32 via 192.168.0.248

MacOS

sudo route -n add -net 192.168.10.54/32 192.168.0.248

Keybase proof

I hereby claim:

  • I am jesseflorig on github.
  • I am jesseflorig (https://keybase.io/jesseflorig) on keybase.
  • I have a public key ASCB1J4AePa7h4NdrdSlBiwabXqBHv_7xbMjYS33cxG44Ao

To claim this, I am signing this object:

@jesseflorig
jesseflorig / Player.gd
Created August 22, 2018 04:17
Detect key press combos for further evaluation
extends KinematicBody2D
const COMBO_TIMEOUT = 0.3 # Timeout between key presses
const MAX_COMBO_CHAIN = 2 # Maximum key presses in a combo
var last_key_delta = 0 # Time since last keypress
var key_combo = [] # Current combo
func _input(event):
if event is InputEventKey and event.pressed and !event.echo: # If distinct key press down
@jesseflorig
jesseflorig / README.md
Created January 20, 2016 20:55 — forked from mbostock/.block
Bar Chart
@jesseflorig
jesseflorig / README.md
Created January 5, 2016 21:15 — forked from mbostock/.block
Wrapping Long Labels

This example, using satirical data from The Onion, demonstrates how to wrap long axis labels to fit on multiple lines.

@jesseflorig
jesseflorig / README.md
Last active December 29, 2015 14:51
Link Chart Implementaion

This force directed graph has (will have) the following features:

  • SVG & force layer fills the parent container
  • Nodes confined to container
  • Zoomable
  • Resize to fill screen
  • Context menu
  • Hover popup
  • Node icons
@jesseflorig
jesseflorig / README.md
Created December 28, 2015 16:19 — forked from mbostock/.block
Multi-Foci Force Layout

Click to perturb or drag the nodes!

This example demonstrates the flexibility of D3’s force layout. By using position Verlet integration, it is easy to add custom forces to a layout. In this example, the nodes are clustered around four foci using additional forces: the odd nodes are pushed down, the even nodes are pushed up, and a similar bisecting force is applied laterally. These custom forces are based purely on the index of the node, but they could just as easily be derived from properties of data!

@jesseflorig
jesseflorig / README.md
Created December 28, 2015 15:30 — forked from mbostock/.block
Build Your Own Graph!

Click to add nodes! Nodes near the cursor will be linked to the new node.

D3's force layout uses the Barnes–Hut approximation to compute repulsive charge forces between all nodes efficiently. Links are implemented as geometric constraints on top of position Verlet integration, offering greater stability. A virtual spring between each node and the center of the chart prevents nodes from drifting into space.

@jesseflorig
jesseflorig / index.html
Created December 28, 2015 15:29 — forked from mbostock/.block
Arc Clock
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.path--background {
fill: none;
stroke: #000;
stroke-width: 2px;
}
@jesseflorig
jesseflorig / README.md
Created December 28, 2015 15:27 — forked from mbostock/.block
Sticky Force Layout

This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.

Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.

Also note that the force layout resumes au