Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
twitter.com/denzuko

Dwight Spencer (denzuko@mastodon.social) denzuko

💬
twitter.com/denzuko
View GitHub Profile
@ropnop
ropnop / docker_aliases.sh
Created July 18, 2019 02:16
Docker aliases
function dockershell() {
docker run --rm -i -t --entrypoint=/bin/bash "$@"
}
function dockershellsh() {
docker run --rm -i -t --entrypoint=/bin/sh "$@"
}
function dockershellhere() {
dirname=${PWD##*/}
@bartosz25
bartosz25 / Airflow external triggers
Last active November 29, 2023 11:15
Apache Airflow external trigger example
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\"}"}'
@livingstonetech
livingstonetech / calculate_totp.py
Created April 29, 2019 07:16
Reference code to calculate TOTP, given a base32 secret.
#!/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.
@WindfallLabs
WindfallLabs / my_tweaks.zs
Last active November 12, 2019 05:58
ZenScript for MC Recipies
///// Variables
///// Removals
///// Replacements/Alterations
import minetweaker.item.IIngredient;
///////////////////////////////////////////////////////////////////////////////
// Variables
///////////////////////////////////////////////////////////////////////////////
@carlessanagustin
carlessanagustin / chronograf_dashboard.sh
Created December 7, 2018 16:45
Chronograf dashboard import/export tool - EXPERIMENTAL
#!/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
@denzuko
denzuko / fbctf-bases.txt
Created November 20, 2018 00:25 — forked from Bryan1998/fbctf-bases.txt
FBCTF Bases
### 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
@patientplatypus
patientplatypus / Orbit.vue
Created August 31, 2018 20:57
Simple Vue.js OrbitDb chat example
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
@abdulhadad
abdulhadad / temp_springapp_docker-compose_docker-machine.md
Last active May 19, 2020 23:32
temp_springapp_docker-compose_docker-machine.md

software kebutuhan

git

git --version git config --global user.name "Nama Saya" git config --global user.email "nama.saya@gmail.com"

java jdk 8, dibutuhkan gradle

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',
@kiichi
kiichi / AlaSQLInVue.vue
Last active December 14, 2021 02:07
Use alasql in Vue.js
<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>