Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
OLD_MODULE_NAME="$0"
NEW_MODULE_NAME="$1"
go mod edit -module ${NEW_MODULE_NAME}
-- rename all imported module
find . -type f -name '*.go' \
-exec sed -i -e 's,{OLD_MODULE_NAME},{NEW_MODULE_NAME},g' {} \;
import os
sublime_binary_path = "/tmp/sublime_text"
version_magic_string = "4126"
sz_magic_string = 4
version_magic_string_offset = 0x0002d78a # (Real offset from xxd)
is_file_read = os.access(sublime_binary_path, os.R_OK)
if not is_file_read:
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created February 7, 2022 16:39
ADB Commands

ADB Commands

Enable Disable Mobile Internet

ref

airplane
  enable
    adb shell settings put global airplane_mode_on 1
 adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
https://nyaa.si
https://sukebei.nyaa.si
https://nyaa.net
https://sukebei.nyaa.net
https://tokyotosho.info
https://anirena.com
https://anidex.info
https://nyaa.iss.one
https://fap.iss.one
https://1337x.g3g.fun/
@CypherpunkSamurai
CypherpunkSamurai / install android sdk tool offline.md
Created February 14, 2022 16:07 — forked from alyatwa/install android sdk tool offline.md
install sdk android offline for windows

main tutorial: https://reactnative.dev/docs/environment-setup

Install Android SDK Platform Tools

tutorial: https://androidsdkoffline.blogspot.com/p/android-sdk-platform-tools.html

  1. download platform-29 -->> https://dl.google.com/android/repository/platform-29_r04.zip
  2. using bash cmd >> start with: cd $ANDROID_SDK_ROOT
    rm -rf platforms/android-29 && unzip /f/react/platform-29_r04.zip -d platforms/android-29 && cd platforms/android-29 && mv android-*/* . && rm -rf android-*

Install Android SDK Build Tools

@CypherpunkSamurai
CypherpunkSamurai / diff_remote.sh
Created February 26, 2022 06:41
Diff Local Repo to Remote Repo
# add the remote
git remote add b https://remote_repo.git
# fetch remote commits
git remote update
# uses current branch for diffing
git diff $(git branch --show-current) remotes/b/remote_repo_branch > diff.diff\
# remove the remote for cleanup
git remote rm b
@CypherpunkSamurai
CypherpunkSamurai / cloudflare_hello.js
Last active March 3, 2022 04:23
CloudFlare Woker Script
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {