This file contains 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
splitIcoFile = function( inputFilePath ) { | |
const fs = require("fs"); | |
const path = require("path"); | |
const DFILE = fs.openSync(inputFilePath, 'r'); | |
const BASENAME = path.basename(inputFilePath, ".ico"); | |
const HEADER_SIZE = 6; | |
const IMAGE_HEADER_SIZE = 16; |
This file contains 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
/* | |
* We have a worker function that does some expensive task, e.g., an | |
* I/O task or something else. | |
*/ | |
worker = function ( jobId ) { | |
// we need to put it into a new promise object | |
return new Promise(function(resolve, reject) { | |
// It will take something between 1 and 2 seconds. |
This file contains 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
javascript:void function(){var e=function(t,o){if(0>o)return e(t,o+26);for(var n="",d=0;d<t.length;d++){var r=t[d],c=t.charCodeAt(d);c>=33%26%26256>=c%26%26(r=String.fromCharCode(c-1)),n+=r}return n};$(".obfuscated-content").removeClass("obfuscated-content"),$(".laterpay-under-overlay").next().removeClass(),objs=$(".obfuscated");for(var t=0;t<objs.length;++t)decoded=e(objs[t].innerText),node=$(objs[t]),node.length>0%3F(contents=node.contents(),contents.each(function(t,o){decoded=e($(o).text()),$(o).is("a")||(o.textContent=decoded)})):(decoded=e(node.text()),node.text(decoded))}(); |
This file contains 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 | |
[ $( whoami ) != "root" ] && { | |
echo "Run with sudo." | |
exit 1 | |
} | |
apt install ruby-dev | |
gem install t |
This file contains 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 | |
[ -z $( command -v t ) ] && { | |
echo "'t' gem (https://github.com/sferik/t) not installed." | |
exit 1 | |
} | |
[ -z "$1" ] && { | |
echo "No twitter handle (e.g. @myacc) provided." | |
exit 1 | |
} |
This file contains 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 | |
sinkname="combined" | |
# check root | |
[ $( whoami ) == "root" ] && { | |
echo "-- please run as regular user." | |
exit 1 | |
} |
This file contains 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
d3v4: Donut chart with externalized legend |
This file contains 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
d3v3: Chord diagram |
This file contains 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
d3v4: Chord diagram |
This file contains 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
d3v4: Packed bubbles |
OlderNewer