Skip to content

Instantly share code, notes, and snippets.

View minhng99's full-sized avatar
🤖
Making the world a better place, one bit at a time!

Nguyen Quang Minh minhng99

🤖
Making the world a better place, one bit at a time!
View GitHub Profile
@minhng99
minhng99 / L3250_Reset.py
Created March 8, 2024 06:35 — forked from Bloody-Badboy/L3250_Reset.py
EPSON L3250 Series Waste Ink Counter Reset Using SNMP Protocol (Remove Service Required)
import re
from easysnmp import Session
from pprint import pprint
from struct import pack, unpack
printer_ip = "10.0.0.222"
session = Session(hostname=printer_ip, community="public", version=1, timeout=1)
password = [74, 54]
@minhng99
minhng99 / beam_decompile.erl
Created January 24, 2024 01:42 — forked from andelf/beam_decompile.erl
Erlang BEAM file decompile to .erl file
#!/usr/bin/env escript
% -*- mode: erlang -*-
main([BeamFile]) ->
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
@minhng99
minhng99 / Makefile
Created December 3, 2022 12:55 — forked from adde88/Makefile
mdk4 - LEDE
#
# Copyright (C) 2009-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mdk4
@minhng99
minhng99 / mount_qcow2.md
Created November 16, 2022 08:21 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
#EXTINF:-1 tvg-logo="https://www.hieuhien.vn/wp-content/uploads/2019/01/hieu-hien-vn-logo.png",HieuHien.vn update 31/8/2019
http://hjyjrvmlsk.vcdn.com.vn/hls/elgfjdh/index.m3u8
#EXTINF:-1 tvg-logo="https://www.hieuhien.vn/wp-content/uploads/2019/01/hieu-hien-vn-logo.png",Fanpage: facebook.com/HieuHien.vn
http://hjyjrvmlsk.vcdn.com.vn/hls/elgfjdh/index.m3u8
#EXTINF:-1 tvg-logo="https://www.hieuhien.vn/wp-content/uploads/2019/01/hieu-hien-vn-logo.png",Cộng đồng HieuHien.vn: facebook.com/Groups/HieuHien.vn
http://hjyjrvmlsk.vcdn.com.vn/hls/elgfjdh/index.m3u8
#EXTINF:-1 group-title="ĐỊA PHƯƠNG" tvg-logo="http://gardenmedia.vn/kcfinder/upload/images/Quang-Cao-Truyen-Hinh-Vinh-Long-1(1).jpg",Vĩnh Long 1 HD
http://htv-drm-live-cdn.fptplay.net/CDN-FPT02/THVL1-HD-1080p/chunks.m3u8
@minhng99
minhng99 / README.md
Last active September 16, 2020 12:40 — forked from lifehome/README.md
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  • If you are using IPv4 for A record, append -v4 to cfupdater in the following systemd service unit.
  • If you are using IPv6 for AAAA record, append -v6 to cfupdater in the following systemd service unit.
  • If you prefer a dual-stack record, append -dualstack to cfupdater in the following systemd service unit.
  1. chmod +x /usr/local/bin/cfupdater
  2. Create a systemd service unit at /etc/systemd/system/, the cfupdate.service is shown as an example.
@minhng99
minhng99 / btrfs-undelete
Created October 13, 2019 12:41 — forked from Changaco/btrfs-undelete
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@minhng99
minhng99 / fix-wordpress-permissions.sh
Created June 21, 2018 05:03 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@minhng99
minhng99 / cloudflare-update-record.sh
Last active May 29, 2018 21:48 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl --interface eth0 -s http://ipv4.icanhazip.com)
@minhng99
minhng99 / gist:257465b16b9809799f25325bfeb17ac5
Created June 19, 2016 06:19 — forked from shakalaca/gist:4942cfb8a4869325cdc9
Howto: compile mkbootimg/mkbootfs/make_ext4fs on OS X
mkdir source
mkdir bin
# clone source
cd source
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/libselinux
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/core
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/zlib
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/extras