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
| data:text/html, <html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>*scratch*</title><style> body{font-family:Hack,Menlo,Monaco,'Droid Sans Mono','Courier New',monospace;white-space:pre}body style{display:inline}style::before{content:'<style>'}style::after{content:'<\/style>'}*::before,*::after{color:rgba(136,18,128,0.5)}</style><script> const selectOuterMostNonBodyNode = (node) => node.parentNode.tagName === 'BODY' ? node : node.parentNode;function insertAfterSelection(selection,html){if(html === '') return;let nodeToInsert=document.createElement('div');nodeToInsert.innerHTML=html + '<br>';let range=selection.getRangeAt(0);let clone=range.cloneRange();let {endContainer} = range;range.setStartAfter(selectOuterMostNonBodyNode(endContainer)); range.insertNode(nodeToInsert);clone.setStart(clone.endContainer, clone.endOffset);selection.removeRange(range); selection.addRange(clone);} var globalEval=eval;function evaluate(){let selection=documen |
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
| console.log('\u134D\u1341\u121D\u1361\u1260\u12AB\u12ED') // "ፍፁም፡በካይ" | |
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
| // OG | |
| // https://jsfiddle.net/fitsum/40t8h2no/ | |
| // params | |
| s:String = string | |
| f:String = filler character | |
| e:String = effect name; eg. "rev", "zig" | |
| w:Number = horizontal spacing | |
| const ASCIIcade = (s, f = null, e = null, w = 3) => { |
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
| //TODO: add cursor bg and rotate script. can't tell what's happening without visual | |
| let lastCoords = []; | |
| const handleDir = e => { | |
| let xDiff, yDiff, currCoords = [e.x, e.y]; | |
| if ( lastCoords.length !== 0 ){ | |
| xDiff = currCoords[0] - lastCoords[0]; | |
| yDiff = currCoords[1] - lastCoords[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
| var angle = null, | |
| step = 20, | |
| rate = 90; | |
| draw = () => { | |
| if (!angle) { | |
| angle = 0; | |
| } | |
| console.clear(); |
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 now, dt, | |
| rate = 0.5, | |
| last = performance.now(); | |
| function frame() { | |
| now = performance.now(); | |
| dt = (now - last) / 1000; // duration in seconds | |
| if(dt >= rate){ | |
| console.log("bing") | |
| last = now; |
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
| # Welcome to Sonic Pi v2.10 | |
| A = :A | |
| B = :B | |
| C = :C | |
| D = :D | |
| G = :G | |
| mainPattern = [ | |
| [B, 0], |
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
| f = function(needle,haystack,collect){ | |
| collection = []; | |
| haystack.filter(function(item){ | |
| if(typeof item === "string" && item.match(needle)!== null) | |
| collect += item; | |
| }) | |
| return collect; | |
| } |
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
| bison || flacc | |
| flex | |
| qt5-default | |
| libgtk-3-dev | |
| libpcap0.8-dev |
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 source = [{name: "Fitsum", race: "blk"},{name: "Alice", race: "wht"},{name: "Jen", race: "wht"},{name: "Kim", race: "blk"},{name: "Lee", race: "asn"}], | |
| target = []; | |
| function userExists(name, idx, oldArr) { | |
| return target.some(function(el) { | |
| return el.name === name; | |
| }); | |
| } | |
| function addUser(name, idx, newArr) { |