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
const axios = require('axios') | |
const fs = require('fs-extra') | |
const TimeoutStream = require('./timeoutStream') | |
const DEFAULT_TIMEOUT = 10000 | |
module.exports.download = function download(downloadURL, destPath, timeout=DEFAULT_TIMEOUT) { | |
const tmpPath = `${destPath}.tmp` |
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
jq -R 'split(".") | .[:2] | map( @base64d | fromjson | if (.exp) then (. + ({ "expiry": .exp | strflocaltime("%Y-%m-%dTT%H:%M:%S %Z") })) else . end )' <<< "$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
runtime.cc:655] Runtime aborting... | |
runtime.cc:655] Dumping all threads without mutator lock held | |
runtime.cc:655] All threads: | |
runtime.cc:655] DALVIK THREADS (38): | |
runtime.cc:655] "Binder:17466_1" prio=5 tid=14 Runnable | |
runtime.cc:655] | group="" sCount=0 dsCount=0 flags=0 obj=0x13501ec0 self=0x7a21018080 | |
runtime.cc:655] | sysTid=17485 nice=0 cgrp=default sched=0/0 handle=0x784c2fbcc0 | |
runtime.cc:655] | state=R schedstat=( 26369115 43215835 91 ) utm=2 stm=0 core=2 HZ=100 | |
runtime.cc:655] | stack=0x784c204000-0x784c206000 stackSize=995KB | |
runtime.cc:655] | held mutexes= "abort lock" "mutator lock"(shared held) |
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
EQ preset applied=0 | |
EQ preset=Normal | |
EQ Normal band=0 level=300 / 1500 | |
EQ Normal band=1 level=0 / 1500 | |
EQ Normal band=2 level=0 / 1500 | |
EQ Normal band=3 level=0 / 1500 | |
EQ Normal band=4 level=300 / 1500 | |
EQ preset=Classical | |
EQ Classical band=0 level=500 / 1500 | |
EQ Classical band=1 level=300 / 1500 |
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 | |
IN="$1" | |
MIN_DUR_MINS="${2:-30}" | |
MIN_PART_DURATION_SECS=$(($MIN_DUR_MINS * 60)) | |
IN_PATH=`realpath "$1"` | |
DEFAULT_OUTDIR="$(dirname "$IN_PATH")/parts" | |
OUTDIR="${3:-$DEFAULT_OUTDIR}" | |
OUTFILE_PATTERN="${OUTDIR}/part-%03d.mp3" |
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
#!/system/bin/sh | |
# ####################################### | |
# Adapted from DebKit | |
# https://github.com/cybertim/DebKit/blob/db894dea44705c4a67e0bb8faa67fc3010755483/src/main/res/raw/debkit | |
# ####################################### | |
set -e | |
# directory for setting up debkit | |
ROOT=$(pwd) |
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 -e | |
###### | |
# Installed under cron for root user | |
# sudo crontab -e | |
# * * * * * bash /home/marvin/cron-scripts/check-inet.sh >> /tmp/check-inet.log 2>&1 | |
###### | |
GATEWAY_IP=192.168.0.1 | |
GATEWAY_AUTH="Basic <base64:userpass>" |
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
import { | |
ClientOptions, | |
WritePrecision, | |
WriteOptions, | |
WritePrecisionType, | |
} from '@influxdata/influxdb-client/dist/options'; | |
import TransportImpl from '@influxdata/influxdb-client/dist/impl/node/NodeHttpTransport'; | |
import WriteApiImpl from '@influxdata/influxdb-client/dist/impl/WriteApiImpl'; | |
import QueryApiImpl from '@influxdata/influxdb-client/dist/impl/QueryApiImpl'; | |
import { |
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 -e | |
# Usage: ./extract-product-list.sh foodgrains.json > foodgrains.txt | |
jq -j '.ProductList[] | .product[] | .Name, " (Price: ", .Price, ", Offer Price: ", .sale_price, ")\n"' $@ |
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 -e | |
dest="$(date '+%Y-%m-%d')-snapshot" | |
container="${1:-influxdb-1}" | |
db="${2:-comp_prices}" | |
destpath="/tmp/${dest}" | |
destfile="/tmp/${dest}.tgz" | |
docker exec -it $container influxd backup -portable -database $db "$destpath" |
NewerOlder