Skip to content

Instantly share code, notes, and snippets.

View azureru's full-sized avatar
🌎
.....................................

Erwin Maulana Saputra azureru

🌎
.....................................
View GitHub Profile
@azureru
azureru / Adb-commands.md
Last active February 17, 2017 19:32
Adb Commands Cheatsheet

Install

adb install {yourapk.apk}

Inside Shell

get list of running process, android app will also be listed here by the package name

ps

##Get list of installed packages

@azureru
azureru / notify-transmission.sh
Last active February 17, 2017 19:41
Transmission And Node-Red
#!/bin/bash
curl -sS -o /dev/null -X GET http://10.0.1.200:9018/notify/transmission?name=$TR_TORRENT_NAME&time=$TR_TIME_LOCALTIME > /dev/null 2>&1
# Save the file - for example to /var/scripts/notify-transmission.sh
# Change the file permission to be executable
# stop transmission daemon first by
#
# sudo service transmission-daemon stop
#
@azureru
azureru / install.sh
Created May 20, 2017 20:30
Node-Red On Armbian
# remove repo versions
sudo apt-get remove -y nodered nodejs nodejs-legacy npm
sudo apt-get autoremove -y
# use nodesource
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
# necessary dependencies (e.g for node-gyp) and ofcourse the node itself
sudo apt-get install -y build-essential python-dev nodejs
@azureru
azureru / digital-ocean DNS on node-red.js
Last active May 27, 2017 15:58
Node-red Dyndns using digitalocean
// the node-script
var request = global.get('request');
var accessToken = "YOURACCESSTOKEN";
var domain = "YOURDOMAIN";
var record = "YOURDNSRECORD";
var ip = msg.payload;
var options = {
@azureru
azureru / ffmpeg-time-lapse.bash
Last active November 9, 2017 09:54
FFMPEG Time Lapse
# concat images
ffmpeg -r 30 -f image2 -s 1920x1080 -i end%05d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p part0.mp4
# concat videos
for f in ./part*.mp4; do echo "file '$f'" >> mylist.txt; done
fmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4
@azureru
azureru / Bash-Cheatsheet
Last active November 9, 2017 10:21
Feeding FTP using Image from Internet
#!/bin/bash
wget https://image
ftp -n <<EOF
open ftp.example.com
user user secret
put my-local-file.txt
EOF
@azureru
azureru / k8.md
Last active March 17, 2018 19:40
Kubernetes Cheatsheet

Starting Up

If you manage it everyday - add this to your .basrc or .bash_profile or cloud-console. If not then all k in this cheatsheet means kubectl

alias k="kubectl"
To gain access to a pod
@azureru
azureru / rotate.sh
Last active June 24, 2020 01:38
Log Rotate
#!/bin/bash
### User Pass Mysql ###
USER=backup
PASS=backup
DBNAME=project_sql
BACKUP_DIR="/root/backup"
DST_HOST="user@host"
REMOTE_DST_DIR="/root/backup"
BACKUP_DAILY=true # if set to false backup will not work

Keybase proof

I hereby claim:

  • I am azureru on github.
  • I am azureru (https://keybase.io/azureru) on keybase.
  • I have a public key whose fingerprint is 9395 B8CA C51B FD8E 9BB2 6419 5DCD 4150 C59E AA8C

To claim this, I am signing this object: