Skip to content

Instantly share code, notes, and snippets.

View rafszul's full-sized avatar

rafal szulczewski rafszul

View GitHub Profile
@robschmuecker
robschmuecker / README.md
Last active April 24, 2024 14:12
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@staltz
staltz / introrx.md
Last active May 2, 2024 12:31
The introduction to Reactive Programming you've been missing
@rafszul
rafszul / neighbrs.org
Created July 19, 2014 13:28
neighbrs.org description

##[neighbrs.org][1]


[neighbrs.org][2] is a colaborative project aimed at supporting community managers in developing and maintenance of simple websites or forums for their local communities or projects


open source - free - wordpress - framework - methodology

@rafszul
rafszul / README.md
Created July 24, 2014 11:52 — forked from mbostock/.block

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.

@alexmingoia
alexmingoia / gist:4db967e5aeb31d84847c
Last active August 3, 2018 22:48
Beyond Angular and Backbone with Undirectional apps

Beyond Angular and Backbone with Unidirectional apps

What is a unidirectional app?

Unidirectional is a term coined by React engineers to describe the data flow of an application. Unidirectional apps employ functional reactive programming techniques such as immutability, purity, and most importantly unidirectional (as opposed to bidirectional) data flow.

A unidirectional app is defined by no mutable references no two-way references between concerns.

Unidirectional app flowchart

<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 560 1388">
<defs>
<mask id="canTopMask">
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image>
</mask>
</defs>
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image>
</svg>
@rafszul
rafszul / -*-Info-*-.markdown
Last active August 29, 2015 14:14
/* Info */

/* Info */

see the fancy panel in top left corner? well, the code below is what makes it what it is so change it according to your needs. obviously there is also css wherever the css is

A Pen by @rafszul on CodePen.

License.

// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@rafszul
rafszul / SVG-Sprite-Animation-#2.markdown
Last active August 29, 2015 14:15
SVG Sprite Animation #2

SVG Sprite Animation #2

Showing first keyframe animation and animating color over step(), then also showing how scrolling through a sprite can be used for seamless background + also parallax with the same animation over different time scales.

Forked from Sarah Drasner's Pen SVG Sprite Animation #2.

A Pen by @rafszul on CodePen.

License.