Skip to content

Instantly share code, notes, and snippets.

View basilbeltran's full-sized avatar

Basil Beltran basilbeltran

View GitHub Profile
@basilbeltran
basilbeltran / datgui-build.js
Created October 17, 2018 22:41 — forked from heaversm/datgui-build.js
Automatically build a dat gui from a javascript object
config = { //SAMPLE OBJECT - replace this with your data object
stroke: 2, //svg stroke value
opacity: 0.3, //0-1
offsetX: 120, //px
offsetY: 80,
fontWeight: 400, //css font-weight
fontSize: 12, //in px
changePositive: '\u25B4', //unicode character for up arrow
changeNegative: '\u25BE', //unicode character for down arrow
colorBlue: '#1190A3', //all hex colors will automatically use the addColor dat gui function
@basilbeltran
basilbeltran / README.md
Created October 17, 2018 22:51 — forked from robschmuecker/README.md
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.

@basilbeltran
basilbeltran / header.html
Last active October 26, 2018 16:37
Three.js-libs
   <link rel="import" href="../assets/js/dist/paper-gui.html">
   <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/97/three.js"></script>
   <script src="../assets/libs/OrbitControls.js"></script>    
   <script src="../assets/libs/TrackballControls.js"></script>
   <script src="../assets/libs/jquery-3.1.0.js"></script>
   <script src="../assets/libs/dat.gui.min.js"></script>
<!-- <script src="../assets/libs/three.js"></script> -->
@basilbeltran
basilbeltran / iTermAppleScript
Created October 27, 2018 04:37
run iterm with start commands
#!/bin/bash
read -r -d '' script <<'EOF'
on run argv
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default"
tell the last session
repeat with arg in argv

#DaftPunKonsole

A console to recreate the famous "Harder, Better, Faster, Stronger" by Daft Punk. Use your keyboard ! not the mouse (hey, it's a console). Use the other keys to get different sounds (Normal, High, Low). You can do it !

Forked from Malik Dellidj's Pen #DaftPunKonsole.

A Pen by Florian Wartner on CodePen.