Skip to content

Instantly share code, notes, and snippets.

@NyaMisty
NyaMisty / README.md
Last active September 9, 2022 23:12
Youtube Channel Backup without big hard disk
  1. Open a GCP instance and mount google drive: ~/fclone mount yuya_bak:/ /home/misty/remote_p -v --drive-chunk-size=16M
  2. Download ffmpeg wrapper and yt-dlp nightly version (after 2021.06.01)
  3. Download using yt-dlp: (Preparation: make the ytdl_mp4merged_log directory for log, change thread num 16 to a proper value, change /home/misty/remote_p to your mount point correspoindingly, change /home/misty/testmp4/ffmpeg to the ffmpeg wrapper)
yt-dlp -j --flat-playlist 'https://www.youtube.com/channel/UCjGE11ZnF0JSR8egVAwh-3A/videos' | jq -r '.url' \
  | parallel -j 16 -t -v --progress \
  | "yt-dlp --write-comments --downloader ffmpeg --merge-output-format mp4 --ffmpeg-location /home/misty/testmp4/ffmpeg -f 'bv[ext=mp4]+ba[ext=m4a]/b' -P 'home:/home/misty/remote_p' -i -o '%(uploader)s-mp4merged/%(title)s-%(id)s/%(id)s.%(ext)s' 'https://www.youtube.com/watch?v={0}' > ytdl_mp4merged_log/{0}.log 2>&1" \
  2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
@NyaMisty
NyaMisty / FuckWordDefaultStyle.ipynb
Created May 24, 2021 22:44
Replace word's default style without touching direct style, for all paragraph before the first Title1 style paragraph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NyaMisty
NyaMisty / fuck115.html
Last active April 16, 2021 19:03
fuck115
<!DOCTYPE html>
<!-- <html><head></head><body></body></html> -->
<html class="layout-frame bd-core layout-allscreen">
<head>
<meta charset="UTF-8">
<meta itemprop="name" content="115,一生相伴" />
<meta itemprop="image" content="web_icon.jpg" />
<meta name="baidu_union_verify" content="52cba82272ca074f2ef94d55d9083884">
<title>115,一生相伴</title>
This file has been truncated, but you can view the full file.
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on April 11, 2021 */
@font-face {
font-family: 'huakang_shaonv_for_powerlinRg';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAKf+sAA4AAABPgrAAKf9QAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgo5OCFwJFBEICoK1+mCCgIJiATYCJAOC+RwLgvkgAAQgBYNEByAMgR3P//8fm4nshUe3ChMqYycBQlFRcIXJTKz8J8k1CUqA0n7vNomqTvKpcUYYQzTaMaRwv8chfikqgYqXl0CkyN01o5ZARldbN5D02RyjLalQNRHu8L8Q/P//////////////////T9LxfLk5M/9lZt7MvL9/r+xu/t/kJkE5oogoBBRFLklEMLaUtrTYC1tUBLX20rb20F4nsGg2lM08ikKuxcys14uIiKbfi8GQEhE8gEGjMMrDHmiGBgyPE/UWJ9Nx9IhYOLOqEUsRMcGRvq3Qkcy4hnq+XNcTYDOzTJRCMpNcfaVqXVYHpRj29GuJ+lpKKcVwLJz1qhLi7oQunI2q7psRQfjC2aoaMY2IDkf6I1skb5NMrDTNTtM0Du5+1J0oNclMcgUmn2KSmXi6rJRSUM/MzIhSSObqx9KO6/r4ibqmgtbqJ9OuDEvZrWsmIt0zafV4xLNhlKc7RflzQp1+Xs68MIAXz4JBgxab0bmR4YAgh0wFcPW9RKblfMmUpb+QSNxf8kxZ+pcTiftFz5SleyXtqxulXCqFijSB+xmy4oGqEvraTAnVrBv9fj/q2AM2M8vQu+xX3L1sH7naXIu4cn2Hev3G/gEwvHEza36T4VbJUptlBr7Nwvgtpg4ZKaNG3/5a7vHXyQl5h0lmkhm/ut49ndE3Ltw5d9fWyDOVv5n25PZg8
@NyaMisty
NyaMisty / huawei-e5885-backup.md
Created August 6, 2020 05:12 — forked from ValdikSS/huawei-e5885-backup.md
How to backup current firmware on Huawei E5885

Huawei E5885 current firmware backup manual.

  1. Download modified usbloader, which will copy proper busybox into /system/busybox and enable telnetd on your device (will add additional line into /system/autorun.sh). Use it only on E5885, not on other device!
  2. Load it using balong-usbdload. Refer to this disassembling manual.
  3. After loading, wait about one minute, disconnect device from the computer and power off the device holding power button for ~15 seconds.
  4. Insert MicroSD card to the device and power it on.
  5. telnet 192.168.8.1 2323
/system/busybox sh
@NyaMisty
NyaMisty / add_nijisanji.py
Created July 27, 2020 04:26
NIJISANJI to vdb~
#coding: utf8
import sys
reload(sys)
sys.setdefaultencoding("UTF8")
import requests, re, json
sess = requests.Session()
r = sess.get("https://nijisanji.ichikara.co.jp/member/")
urls = re.findall(r"href=(https://nijisanji\.ichikara\.co\.jp/member/.*?)>", r.text)
### Keybase proof
I hereby claim:
* I am nyamisty on github.
* I am nyamisty (https://keybase.io/nyamisty) on keybase.
* I have a public key ASD7LTpwNB5Z8nVVe7ulyhPeHBI9MzdkccnsRkhNGZuh2wo
To claim this, I am signing this object:
@NyaMisty
NyaMisty / _IDAPython-Snippets.md
Last active July 31, 2023 07:13
IDAPython snippets

This gist contains lots of my written IDAPython snippets.

@NyaMisty
NyaMisty / iphlpapi.py
Created October 21, 2019 17:42
Python binding for GetIfTable2, GetIpInterfaceTable and GetAdaptersInfo
import ctypes
from ctypes import Structure, POINTER, c_char, c_void_p, c_ulong
from ctypes.wintypes import DWORD, UINT, BYTE, BOOL, ULONG, WCHAR, WORD, USHORT, BOOLEAN
from winerror import NO_ERROR, ERROR_INSUFFICIENT_BUFFER
from comtypes import GUID
ULONGLONG = ctypes.c_ulonglong
ULONG64 = ctypes.c_uint64
UCHAR = ctypes.c_ubyte
This file has been truncated, but you can view the full file.
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on January 5, 2019 */
@font-face {
font-family: 'huakang_shaonv_for_powerline_updated';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAM2boABEAAABQpggAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABgAAAABwAAAAcgKK3skdERUYAAAGcAAAAHgAAAB4AJy2nT1MvMgAAAbwAAABgAAAAYK+b6nVjbWFwAAACHAAAV90AAIlefs99+WN2dCAAAFn8AAAASgAAAFyhNPxwZnBnbQAAWkgAAAAUAAAAFIMzwk9nYXNwAABaXAAAAAgAAAAIAAAAEGdseWYAAFpkADGLJABM5uhcvnKPaGVhZAAx5YgAAAAzAAAANg8gmVxoaGVhADHlvAAAACEAAAAkDF4z3WhtdHgAMeXgAAA7BwAAtoQoYkdGbG9jYQAyIOgAAH9pAAC2iGpID9BtYXhwADKgVAAAACAAAAAgLkACZW5hbWUAMqB0AAABWQAAAyAoYG+ZcG9zdAAyodAAAMSzAAHCQHBFRvVwcmVwADNmhAAAAFwAAACd8oN2q3dlYmYAM2bgAAAABgAAAAaxglwwAAAAAQAAAADX2mhSAAAAANBx7YIAAAAA2FZh3QABAAAADAAAABYAAAACAAEAAS2gAAEABAAAAAIAAAAAAAQG3AGQAAUABAaQBhgAAAFXBpAGGAAABEAAeAJtAAACAQYJAwEBAQEB5gAm/wgH+PsAAAAYAAAAAHVuY2kBgAAK//sHoP5mAAAHoADIYAIB3//fAAAEGgXcAAAAIAABeNqM2vdbkwm7LWAFxY69D13F3nvvji29EBKSkJBGCpBOAqSTUAKhhQ7WsWs66Y597N2xiyJgL6NjF84+787hQm