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
#!/bin/bash | |
# first extracting the repository name | |
rep_regex="\\/([^\\/]*)\\.git$" | |
if [[ $1 =~ $rep_regex ]] | |
then | |
reponame="${BASH_REMATCH[1]}" | |
else | |
echo "$1 doesn't match" >&2 # this could get noisy if there are a lot of non-matching files | |
exit |
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
# input format | |
# 0 n 0 0 0 etc | |
# ^ | |
# simulating input 124 | |
>++++++++++++++++++++++++++++++ | |
++++++++++++++++++++++++++++++ | |
++++++++++++++++++++++++++++++ | |
++++++++++++++++++++++++++++++++++ | |
>>>+<<< | |
# 0 124 0 0 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
/* | |
init commands to run | |
$ npm init | |
$ npm install jsdom | |
$ npm install node-fetch | |
*/ | |
const {JSDOM} = require("jsdom"); | |
const fetch = (()=>{let m = import("node-fetch");return async (...args)=>await (await m).default(...args);})(); | |
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
let width = 1500; | |
let height = 1500; | |
let canvas = document.createElement("canvas"); | |
document.body.innerHTML = ""; | |
document.body.appendChild(canvas); | |
canvas.width = width; | |
canvas.height = height; | |
let ctx = canvas.getContext("2d"); | |
let imgdata = ctx.getImageData(0,0,width,height); |
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
const [chrome,navigator,window,document,$vars] = (()=>{ | |
let vars = []; | |
let proxyMethodNames = | |
`apply | |
construct | |
defineProperty | |
deleteProperty | |
get | |
getOwnPropertyDescriptor | |
getPrototypeOf |
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
let inputs = [...document.querySelectorAll("table.responsive-table td input.waves-button-input")]; | |
let arr = `01000-15.0b.zip | |
01000-20.0a.zip | |
02000-15.0b.zip | |
02000-20.0a.zip | |
03000-15.0b.zip | |
03000-20.0a.zip | |
04000-15.0b.zip | |
04000-20.0a.zip | |
05000-15.0b.zip |
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
{ | |
let ab = new ArrayBuffer(8); | |
let f = new Float64Array(ab); | |
let ints = new Int32Array(ab); | |
let tally = newarr(64); | |
for(let i = 0; i < 100000; i++){ | |
f[0] = Math.random(); | |
for(let i = 31; i >= 0; i--){ | |
tally[31-i] += ((ints[0]>>i)&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
let canvas = document.querySelector("canvas"); | |
let ctx = canvas.getContext("2d"); | |
let display = document.createElement("canvas"); | |
document.body.appendChild(display); | |
display.style.zIndex = "1000"; | |
display.style.position = "absolute"; | |
display.style.bottom = "0px"; | |
display.style.right = "0px"; | |
display.style.pointerEvents = "none"; | |
display.width = canvas.width/4; |
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
const TAG_End = 0; | |
const TAG_Byte = 1; | |
const TAG_Short = 2; | |
const TAG_Int = 3; | |
const TAG_Long = 4; | |
const TAG_Float = 5; | |
const TAG_Double = 6; | |
const TAG_Byte_Array = 7; | |
const TAG_String = 8; | |
const TAG_List = 9; |
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
******** | |
*<>^<>^* | |
* v<>v* | |
*<> ^ = | |
* ^<>v * | |
* v <>* | |
******** |