Skip to content

Instantly share code, notes, and snippets.

View jshaw's full-sized avatar
🤖
👨‍🎨 👨‍💻

Jordan Shaw jshaw

🤖
👨‍🎨 👨‍💻
View GitHub Profile
@jshaw
jshaw / index.html
Created November 14, 2012 18:14 — forked from anonymous/index.html
A CodePen by trickeedickee. CSS3 AT-AT - A pure CSS3 experiment I created. I could do with reducing the number of divs used to create the body parts. I also need to streamline the animations.
<div id="main">
<div id="head-neck-body">
<div id="head-neck">
<div id="head">
<div class="shape02"></div>
<div class="shape0"></div>
<div class="shape01"></div>
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<title>Deferred</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jshaw
jshaw / tourney.html
Last active August 29, 2015 14:13 — forked from sterlingwes/tourney.html
<!DOCTYPE html>
<html>
<head>
<title>Tournament Bracket Generator</title>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://underscorejs.org/underscore-min.js"></script>
<script>
$(document).on('ready', function() {
var knownBrackets = [2,4,8,16,32], // brackets with "perfect" proportions (full fields, no byes)
@jshaw
jshaw / heapsort.js
Last active August 29, 2015 14:13 — forked from Rosencrantz/heapsort.js
var list = [9,1,7,3,4,2,8,0,5,6];
function chunk(list) {
var chunks = [];
for(var i=0; i<list.length; i++) {
if(list.length % 2 == 1 && i+1 == list.length) {
chunks.push(list[i]);
} else {
if(i % 2 == 0) {
chunks.push(Math.max(list[i], list[i+1]));
@jshaw
jshaw / aframe-autoplay-video-on-mobile.js
Created October 25, 2017 20:08 — forked from cvan/aframe-autoplay-video-on-mobile.js
handle autoplay of <video> in A-Frame on mobile (iOS, Android) - see https://github.com/aframevr/aframe/pull/2657/files
function playVideoOnClick (selector) {
el = document.querySelector(selector);
if (el) {
addListener();
} else {
window.addEventListener('load', addListener);
}
function addListener () {
@jshaw
jshaw / .bash_profile
Created February 13, 2019 14:23 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jshaw
jshaw / about.md
Created February 14, 2019 16:57 — forked from mattdesl/about.md
A Browser and Node.js compatible canvas-sketch script for generative and parametric 3D geometry.

Generative Geometry in Browser + Node.js

Here is a script that can be run with canvas-sketch to generate OBJ files from a parametric/algorithmic 3D ThreeJS geometry.

Hitting "Cmd + S" from the canvas-sketch tool will export a PNG and OBJ file of the scene.

If the same script is run from Node, it will simply render the OBJ to stdout, or write to the filename argument if given.

@jshaw
jshaw / GLSL-Noise.md
Created May 30, 2019 18:39 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}