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
#!/usr/bin/env fish | |
# use optipng to optimize png | |
if type -q optipng | |
set pngs (command find . -name "*.png") | |
for i in $pngs | |
# echo $i | |
optipng -strip all $i | |
end | |
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
git rev-parse --abbrev-ref HEAD |
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
{ | |
"caret_extra_bottom": 3, | |
"caret_extra_toop": 3, | |
"caret_extra_width": 3, | |
"color_scheme": "Packages/Theme - Phoenix/Color Scheme/Phoenix Dark Orange.tmTheme", | |
"font_size": 15, | |
"highlight_liine": true, | |
"ignored_packages": | |
[ | |
"Theme - Cobalt2", |
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
#!/usr/bin/env python | |
import os | |
import sys | |
import mmap | |
import string | |
import random | |
from pathlib import Path | |
def random_str(len): |
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
#!/usr/bin/env python3 | |
import os | |
import shutil | |
path = input('enter dir path: ') | |
del_list = [] | |
for p, d, f in os.walk(path): | |
if '.svn' in d: | |
del_path = os.path.join(os.path.abspath(p), '.svn/') |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
import bs4 | |
import re | |
import os | |
import sys | |
from multiprocessing import Pool, cpu_count | |
try: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="UAT FLOW"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.js"></script> | |
</head> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.js"></script> | |
</head> | |
<body> |
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
// from: https://jsperf.com/deep-copy-vs-json-stringify-json-parse/15 | |
function recursiveDeepCopy(o) { | |
var newO, | |
i; | |
if (typeof o !== 'object') { | |
return o; | |
} | |
if (!o) { |
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
// from https://github.com/mishoo/UglifyJS2/blob/harmony/lib/output.js | |
function to_ascii(str) { | |
return str.replace(/[\ud800-\udbff][\udc00-\udfff]|[\u0000-\u001f\u007f-\uffff]/g, function (ch) { | |
var code = get_full_char_code(ch, 0).toString(16); | |
if (code.length <= 2) { | |
while (code.length < 2) code = "0" + code; | |
return "\\x" + code; | |
} else { | |
while (code.length < 4) code = "0" + code; |
NewerOlder