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
function getCookie(key){ | |
var regEx = new RegExp(key+"=([^;]*)","g"); | |
return regEx.exec(document.cookie)[1] | |
} | |
String.prototype.format = function () { | |
var args = arguments; | |
return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) { | |
return ((curlyBrack == "{{") ? "{" : ((curlyBrack == "}}") ? "}" : args[index])); | |
}); |
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
<script type="text/javascript" language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script> | |
<script type="text/javascript" language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/lang-css.js"></script> | |
<script type="text/javascript"> | |
function addLoadEvent(func) { | |
var oldonload = window.onload; | |
if (typeof window.onload != 'function') { | |
window.onload = func; | |
} else { | |
window.onload = function() { | |
if (oldonload) { |
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
//http://www.codingforums.com/showthread.php?t=11156 | |
function hsl2Hex(h, s, l) { | |
var m1, m2, hue; | |
var r, g, b | |
s /=100; | |
l /= 100; | |
if (s == 0) | |
r = g = b = (l * 255); | |
else { | |
if (l <= 0.5) |
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
.CodeMirror-scroll { | |
height: 100%; | |
min-height:300px; | |
} | |
.cm-s-tomorrow-night{ | |
font-family:'Menlo', 'Consolas', "Vera Mono", monospace; | |
font-size:12px; | |
} | |
.cm-s-tomorrow-night { background: none; color: hsl(140,2%,77%); } |
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
var xhr = new XMLHttpRequest() | |
var url = 'http://' | |
xhr.open("GET",url,false) | |
xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8") | |
xhr.send(null) | |
if (xhr.status==200){ | |
var data = JSON.parse(xhr.responseText) | |
console.log(data) | |
} else { |
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
echo -e "\x1b[36m ______ __ __ ______ __ __ __ " | |
echo -e "\x1b[32m/\x1b[36m\ __ \ \x1b[32m /\x1b[36m\ \_\ \ \x1b[32m /\x1b[36m\ __ \ \x1b[32m /\x1b[36m\ \_\ \ \x1b[32m /\x1b[36m\ \ " | |
echo -e "\x1b[32m\ \x1b[36m\ __ \ \x1b[32m \ \x1b[36m\ __ \ \x1b[32m \ \x1b[36m\ \\\\\x1b[32m/\x1b[36m\ \ \x1b[32m \ \x1b[36m\____ \ \x1b[32m \ \x1b[36m\_\ " | |
echo -e "\x1b[32m \ \x1b[36m\_\ \_\ \x1b[32m \ \x1b[36m\_\ \_\ \x1b[32m \ \x1b[36m\_____\ \x1b[32m \/\x1b[36m\_____\ \x1b[32m \/\x1b[36m\_\ " | |
echo -e "\x1b[32m \/_/\/_/ \/_/\/_/ \/_____/ \/_____/ \/_/ " | |
echo -e "" |
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
xrandr --output DP-1 --scale 2x2.001 --panning 3840x2161+3840+0 | |
xrandr --output DP-1 --scale 2x2.001 --mode 1920x1080 --fb 7680x2162 --panning 3840x2162+3840+0 |
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
ps -Ao pid,%cpu,%mem,comm |sort -nrk 2 | head -n 5 | awk '{gsub("(.+/)","",$4);print $4"\t"$1"\t"$2"\t"$3}'| column -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
cat *.csv > combined.csv | |
cat combined.csv | awk '!a[$0]++' > c-no-dups.csv | |
python sort.py | |
cat c-no-dups-sorted.csv | tail -n 350 > topsort350.csv | |
cat topsort350.csv | awk -F, '{print "https://raw.githubusercontent.com/"substr($2,0,length($2))"/master/README.md"}' > readme.links | |
python downloadraw.py |
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 | |
## description: script to download large files from google drive | |
## version 0.1 | |
## author: 0i0 (https://github.com/0i0) | |
usage="$(basename "$0") [-h] link filename-- program to download a file from google drive link | |
where: | |
-h show this help text |
OlderNewer