This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://code.jquery.com/jquery-2.2.3.js" integrity="sha256-laXWtGydpwqJ8JA+X9x2miwmaiKhn8tVmOVEigRNtP4=" crossorigin="anonymous"></script> | |
<script> | |
$(function() { | |
var audio; | |
var playlist; | |
var tracks; | |
var current; | |
fetch('./').then((res) => { | |
res.text().then((text) => { | |
let tmp = $('<div />').html(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/* Zepto v1.1.6 - zepto event ajax form ie - zeptojs.com/license */ | |
var Zepto=function(){function L(t){return null==t?String(t):j[S.call(t)]||"object"}function Z(t){return"function"==L(t)}function _(t){return null!=t&&t==t.window}function $(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==L(t)}function M(t){return D(t)&&!_(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return"number"==typeof t.length}function k(t){return s.call(t,function(t){return null!=t})}function z(t){return t.length>0?n.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in f?f[t]:f[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function H(t,e){return"number"!=typeof e||c[F(t)]?e:e+"px"}function I(t){var e,n;return u[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = function(w) { | |
var win = w || window; | |
var baseQstring = (win.location.search) ? win.location.search : (win.location.hash.split('?')[1] || ''); | |
var qstring = decodeURIComponent(baseQstring.replace('?','')); | |
var keyval_groups = qstring.split(/[\?&]/); | |
var p = {}; | |
for (var i in keyval_groups) { | |
var first_equal = keyval_groups[i].indexOf('=') | |
var key = keyval_groups[i].slice(0, first_equal); | |
var value = keyval_groups[i].slice(first_equal+1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here is an easy way to increment / decement an index by any amount and get the correct value if you were in an infinite / wrapping array | |
var x = [0, 1, 2, 3, 4] // this is the wrapping array we want | |
var n = x.indexOf(0) // this is the index | |
n++ // now you increment or decment, by any amount | |
var val = x[(n>=0)?n%x.length:x.length+n] // this is the magic wrapping sauce | |
console.log(val==1)// true | |
n = -1 | |
val = x[(n>=0)?n%x.length:x.length+n] | |
console.log(val==4) | |
n = -2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # setNestedData | |
export function setNestedData(root, path, value) { | |
var paths = path.split('.'); | |
var last_index = paths.length - 1; | |
paths.forEach(function(key, index) { | |
if (!(key in root)) root[key] = {}; | |
if (index==last_index) root[key] = value; | |
root = root[key]; | |
}); | |
return root; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set autoindent | |
set noswapfile | |
set nobackup | |
syntax on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash history w/ tmux (order matters) | |
shopt -sq cdspell cmdhist extglob histappend | |
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND" | |
# new bash prompt (single quotes important) | |
export PS1='[\u@\h:\w ] $ ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
# Push Bindings | |
bind right:ctrl,cmd push right bar-resize:screenSizeX/2 | |
bind left:ctrl,cmd push left bar-resize:screenSizeX/2 | |
bind up:ctrl,cmd push up bar-resize:screenSizeY/2 | |
bind down:ctrl,cmd push down bar-resize:screenSizeY/2 | |
bind up:ctrl,alt,cmd resize 100% 100% top-left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# # Install apps | |
brew install docker docker-compose tmux wget curl git | |
brew cask install atom slate blender ultimaker-cura google-chrome gimp firefox gqrx inkscape keka figma slack synergy zoom.us virtualbox vlc | |
# # Install settings files | |
wget https://gist.githubusercontent.com/unyo/bfcdfc81a66d2101c67aced713f5dedd/raw/3adc63023d3fc531dd8f8f87ee27c92d3485841f/.bashrc | |
wget https://gist.githubusercontent.com/unyo/b405b78b5a01926fbbce0452c4b69eaf/raw/0a3159012de010913eb87e887a6cd2c84568bb80/.slate | |
wget https://gist.githubusercontent.com/unyo/284cbbd269cde81f85b9e4162a6b6128/raw/f1cb2ec4dc4bb319124cb9f58f42ded7bcf5a4bf/.vimrc | |
wget https://gist.githubusercontent.com/unyo/8f280210381ff9a3f41fb7ab4cff7d43/raw/3b902fff44959c2443d8ad3ece1da63c54e69978/package-list.txt |
OlderNewer