Skip to content

Instantly share code, notes, and snippets.

Basil Beltran basilbeltran

Block or report user

Report or block basilbeltran

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View in-pen-editor.markdown
View #DaftPunKonsole.markdown

#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.

@basilbeltran
basilbeltran / iTermAppleScript
Created Oct 27, 2018
run iterm with start commands
View iTermAppleScript
#!/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
View header.html
   <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 / README.md
Created Oct 17, 2018 — forked from robschmuecker/README.md
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.
View README.md

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 / datgui-build.js
Created Oct 17, 2018 — forked from heaversm/datgui-build.js
Automatically build a dat gui from a javascript object
View datgui-build.js
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 / datgui-build.js
Created Oct 17, 2018 — forked from heaversm/datgui-build.js
Automatically build a dat gui from a javascript object
View datgui-build.js
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 / States
Created Aug 7, 2015
Android State Transitions
View States
private static final String KEY_VAL = "valofit";
private static final String KEY_TRUE = "isittrue";
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
mCurrentVal = savedInstanceState.getInt(KEY_VAL, 0);
mIsTrue = savedInstanceState.getBoolean(KEY_TRUE, false);
public void onSaveInstanceState(@NonNull Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putInt(KEY_VAL, mCurrentVal);
@basilbeltran
basilbeltran / MISC CMD LINE
Last active Aug 29, 2015
misc android blocks
View MISC CMD LINE
android:theme="@android:style/Theme.Holo">
Toast.makeText(getContext(), text/resId, Toast.LENGTH_SHORT).show();
$ ./gradlew tasks
$ ./gradlew installDebug
@basilbeltran
basilbeltran / Options
Last active Aug 29, 2015
ActionBar Options
View Options
extends ListFragment {
private boolean mSubtitleVisible; //instance vbl retained
onCreate...
setHasOptionsMenu(true); //Fragment will be implementing options menu callbacks on behalf of the activity.
setRetainInstance(true); //retain
mSubtitleVisible = false; //retain is for preserving menu state through rotation event
@TargetApi(11) // if ( minSdk < API < 11) !Lint; you have accounted for VERSION_CODE and under
onCreateView...
You can’t perform that action at this time.