I hereby claim:
- I am drugoi on github.
- I am drugoi (https://keybase.io/drugoi) on keybase.
- I have a public key ASAyOaGk9HZ29Q7b7aPGLC2S33RGHMJtfJUaE6zFHONBqQo
To claim this, I am signing this object:
var totalProgress = 0 // I assume this is defined eleswhere but is needed for the scriptler | |
function layerCounter(inObj) { // recursive function to count layers | |
totalProgress += inObj.artLayers.length; | |
for (var i = 0; i < inObj.layerSets.length; i++) { | |
totalProgress++; | |
layerCounter(inObj.layerSets[i]); // recursive call to layerCounter | |
} | |
return totalProgress; | |
} |
I hereby claim:
To claim this, I am signing this object:
''' | |
Taken from: | |
http://stackoverflow.com/users/1074592/fakerainbrigand | |
http://stackoverflow.com/questions/15401815/python-simplehttpserver | |
''' | |
import SimpleHTTPServer, SocketServer | |
import urlparse, os | |
PORT = 3000 |
const download = (fileName, mimeType, fileData) => { | |
if (window.navigator.msSaveOrOpenBlob === undefined) { | |
const e = document.createElement('a'); | |
const href = `data:${mimeType};base64,${fileData}`; | |
e.setAttribute('href', href); | |
e.setAttribute('download', fileName); | |
document.body.appendChild(e); | |
e.click(); | |
document.body.removeChild(e); | |
} else { |
const regex = /^[а-яА-ЯёЁa-zA-Z\u04D8\u04D9\u04B0\u04B1\u0406\u0456\u04A2\u04A3\u0492\u0493\u04AE\u04AF\u049A\u049B\u04E8\u04E9\u04BA\u04BB]$/g; |
import csv | |
# before: git log --pretty=format:%s | grep -E '^(\w+)\((\w+|\*)\)' > commits.log | |
def logFileToList(logFilename): | |
resList = [] | |
with open(logFilename) as f: | |
for s in f: | |
resList.append(s) | |
return resList |
#!/bin/bash | |
# Find something like UKK-0000 in variables | |
# NOTE: Script will use only first match to post comment (head -1) | |
COMMIT_TICKET=$(echo $CI_COMMIT_MESSAGE | grep -e '[A-Z]\+-[0-9]\+' -o | head -1) | |
DESCRIPTION_TICKET=$(echo $CI_COMMIT_DESCRIPTION | grep -e '[A-Z]\+-[0-9]\+' -o | head -1) | |
BRANCH_TICKET=$(echo $CI_COMMIT_REF_NAME | grep -e '[A-Z]\+-[0-9]\+' -o | head -1) | |
# Check is variables not empty | |
if [[ -n "$COMMIT_TICKET" || -n "$BRANCH_TICKET" || -n "$DESCRIPTION_TICKET" ]]; then |
const orders = []; | |
const fetchOrders = async (next = 1) => { | |
const response = await fetch( | |
`https://arbuz.kz/api/v1/order/list?page=${next}&limit=10`, | |
{ | |
headers: { | |
accept: "application/json, text/plain, */*", | |
}, | |
referrer: "https://arbuz.kz/ru/profile", | |
referrerPolicy: "strict-origin-when-cross-origin", |