git --version git config --global user.name "Nama Saya" git config --global user.email "nama.saya@gmail.com"
java -version javac -version
function dockershell() { | |
docker run --rm -i -t --entrypoint=/bin/bash "$@" | |
} | |
function dockershellsh() { | |
docker run --rm -i -t --entrypoint=/bin/sh "$@" | |
} | |
function dockershellhere() { | |
dirname=${PWD##*/} |
curl -X POST http://localhost:8081/api/experimental/dags/hello_world_a/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"task_payload\":\"payload1\"}"}' | |
curl -X POST http://localhost:8081/api/experimental/dags/hello_world_a/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"task_payload\":\"payload2\"}"}' | |
curl -X POST http://localhost:8081/api/experimental/dags/hello_world_a/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"task_payload\":\"payload3\"}"}' |
#!/usr/bin/env python3 | |
""" | |
Gist to calculate Time-based One Time Password (TOTP). | |
This function is designed to be used in two modes: | |
- Current Mode | |
No timestamp supplied, and the current timestamp is considered. | |
This mode gives the totp at the present moment in time. | |
- Historic Mode | |
Here an explicit timestamp is supplied. This is to calculate a TOTP | |
that had occured at a moment in history. |
///// Variables | |
///// Removals | |
///// Replacements/Alterations | |
import minetweaker.item.IIngredient; | |
/////////////////////////////////////////////////////////////////////////////// | |
// Variables | |
/////////////////////////////////////////////////////////////////////////////// |
#!/usr/bin/env bash | |
URL=$2 # http://localhost:8888 | |
FILENAME=$3 # dashboard.json | |
if [ $1 == "export" ]; then | |
curl -i -X GET $URL/chronograf/v1/dashboards > $FILENAME | |
elif [ $1 == "import" ]; then | |
curl -i -X POST -H "Content-Type: application/json" $URL/chronograf/v1/dashboards -d @$FILENAME | |
else |
### DEBIAN STRETCH ### | |
PART I: python script | |
Become root. | |
1. $ sudo -i | |
Make fbctf directory in /opt | |
2. # cd /opt | |
3. # mkdir fbctf | |
Get my modified score_base.py script | |
4. # wget https://gist.githubusercontent.com/Bryan1998/772cf58e6aff7cf360387886f5af56ff/raw/0eae6687df97af7c8246ff468f142730c8375c3c/score_base.py |
Taken from docs here: | |
https://github.com/orbitdb/orbit-db/blob/master/GUIDE.md | |
and here: | |
https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdbfeednameaddress |
git --version git config --global user.name "Nama Saya" git config --global user.email "nama.saya@gmail.com"
java -version javac -version
var packet = require('dns-packet') | |
var axios = require('axios') | |
let buf = packet.encode({ | |
type: 'query', | |
id: 1, | |
flags: packet.RECURSION_DESIRED, | |
questions: [{ | |
type: 'TXT', | |
class: 'IN', |
<script> | |
export default { | |
mounted(){ | |
this.alasql("CREATE TABLE cities (city string, population number)"); | |
this.alasql("INSERT INTO cities VALUES ('Rome',2863223),('Paris',2249975),('Berlin',3517424),('Madrid',3041579)"); | |
var res = this.alasql("SELECT * FROM cities WHERE population < 3500000 ORDER BY population DESC"); | |
console.log(res); | |
} | |
} | |
</script> |