Skip to content

Instantly share code, notes, and snippets.

View dianariyanto's full-sized avatar
🔥
Working from home

Dian Ariyanto dianariyanto

🔥
Working from home
View GitHub Profile
@dianariyanto
dianariyanto / gist:8f8cf555e41cdf7a761f606bead574b7
Created December 31, 2023 14:25
Unable to negotiate with 192.168.1.1 port 22: no matching host key type found. Their offer: ssh-rsa
ssh-keygen -f "/home/me/.ssh/known_hosts" -R "192.168.1.1"
ssh -oHostKeyAlgorithms=+ssh-rsa -t root@192.168.1.1
#!/usr/bin/env lua
local socket = require("socket")
local use_ssl, ssl = pcall(require, "ssl")
local Blynk = require("blynk.socket")
local Timer = require("timer")
local http = require("socket.http")
assert(#arg >= 1, "Please specify Auth Token")
@dianariyanto
dianariyanto / debloat-miui-10-11-12.txt
Last active March 6, 2022 18:49
Debloat Xiaomi Phone with MIUI 10/11/12
pm uninstall -k --user 0 com.miui.msa.global
pm uninstall -k --user 0 com.xiaomi.glgm
pm uninstall -k --user 0 com.facebook.appmanager
pm uninstall -k --user 0 com.facebook.services
pm uninstall -k --user 0 com.facebook.system
pm uninstall -k --user 0 com.mi.webkit.core
pm uninstall -k --user 0 com.android.calendar
pm uninstall -k --user 0 com.miui.calculator
pm uninstall -k --user 0 com.android.deskclock
pm uninstall -k --user 0 com.android.mms
@dianariyanto
dianariyanto / mirror
Created February 17, 2022 17:50
Repo mirroring from gitlab to github
#!/bin/bash
# https://www.shellcheck.net/
#!/bin/bash
read -p "Enter GitLab repo URL : " repo
read -p "Enter GitHub repo URL : " newrepo
IFS='/'
read -a array <<< "$repo"
reponame=${array[1]}
@dianariyanto
dianariyanto / openwrt-docker
Last active February 17, 2022 17:46
Run openwrt router using docker :D
docker run --rm -ti -p 80:80 --name openwrt --net=host --cap-add NET_ADMIN --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7
docker run --rm -ti -p 80:80 --name openwrt --net=conf-vlan11 --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7
docker run --rm -ti -p 80:80 --name openwrt --net=OpenWrt-LAN --cap-add NET_ADMIN --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7
# https://hub.docker.com/r/raiuka/openwrt_on_docker
docker network create -d macvlan --subnet=192.0.0.0/24 --gateway=192.0.0.254 --ipv6 --subnet=fe80::/16 --gateway=fe80::1 -o parent=vlan11 -o macvlan_mode=bridge openwrt-LAN
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.254 --ipv6 --subnet=fe82::/16 --gateway=fe82::1 -o parent=wlan0 -o macvlan_mode=bridge openwrt-WAN
@dianariyanto
dianariyanto / loadbalance-test
Created February 17, 2022 17:42
Simple script to check multiwan loadbalance
#!/bin/bash
# https://www.shellcheck.net/
for i in `seq 1 9000`;
do
ip=$(curl -s "https://projects.milankragujevic.com/ip.php")
echo -e "\e[36;1m" $i "\e[0m served from : $ip"
#ping -c 1 192.168.1.1
#ping -c 1 192.168.3.1
done
@dianariyanto
dianariyanto / gist:d7e78ab570844d94c0ce4544e6e7e995
Created February 8, 2022 23:08
Mirror git to a new repository
git clone --bare <repo>
cd repofolder
git push --mirror <newrepo>
@dianariyanto
dianariyanto / debloat_mokee_rom.log
Created December 4, 2021 22:19
Debloat mokee ROM with GAPPS pico
╭─aryan@lenovo ~
╰─$ adb shell
santoni:/ # pm list packages | grep 'mokee'
package:org.mokee.overlay.dark
package:org.mokee.overlay.accent.red
package:org.mokee.audiofx
package:com.kabouzeid.gramophone.mokee
package:com.mokee.pay
package:org.mokee.overlay.accent.black
package:org.mokee.overlay.accent.brown
@dianariyanto
dianariyanto / debloat_oppo_a3s.log
Last active May 27, 2023 09:37
Debloat OPPO A3S - Hapus Aplikasi Sampah Di HP OPPO A3S
╭─aryan@lenovo ~
╰─$ adb devices
List of devices attached
9267ed9b device
╭─aryan@lenovo ~
╰─$ adb shell
CPH1803:/ $ pm list packages
package:com.coloros.backuprestore
package:com.android.cts.priv.ctsshim
@dianariyanto
dianariyanto / submit.md
Created November 15, 2020 23:25 — forked from tanaikech/submit.md
Enhanced makeCopy() using Google Apps Script

Enhanced makeCopy() using Google Apps Script

Overview

This is sample scripts for copying files to a specific folder in Google Drive using Google Apps Script (GAS).

Description

When the files in Google Drive are copied to a specific folder using GAS, most users will use makeCopy(destination). When the files are copied using makeCopy(), you might have already noticed that only the standalone projects cannot be copied to the specific folder. They are copied to the root folder (My Drive). Also this situation can be also seen even when "copy" of Drive API v2 and v3 is used. I think that this might be a bug. So I would like to introduce 2 sample scripts as the workaround. In the workaround, it uses Drive API.

Sample script 1

This sample is very simple.