Skip to content

Instantly share code, notes, and snippets.

View RinGotou's full-sized avatar
🌽
BUSYYYYYYYYYYY

Rin RinGotou

🌽
BUSYYYYYYYYYYY
  • Daydream Interactive/百花屋
View GitHub Profile

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
<?xml version="1.0" encoding="utf-8"?>
<spnOverrides>
<!-- Korea -->
<spnOverride numeric="45005" spn_display_rule="SPN_RULE_SHOW_PLMN" />
<!-- Japan -->
<spnOverride numeric="44010" spn_display_rule="SPN_RULE_SHOW_PLMN" />
<spnOverride numeric="44020" spn="SoftBank" />
<!-- Hong Kong -->
<spnOverride numeric="45406" spn="SmarTone" />
@mcxiaoke
mcxiaoke / wine-retina.md
Last active June 8, 2024 06:07
Wine and CrossOver Retine Support on macOS. from http://ielk.blogspot.com/2017/02/wine-20-on-macos-10122.html

Blurry font issue with Wine 2.0 on macOS 10.12.2

After installing the latest Wine release, which currently is 2.0 (I chose the development branch) on XQuartz 2.7.11, I was having problems with blurry text in both winecfg, regedit and other programs launched through Wine. After trying to enable font smoothing and font replacements (source) with only slight changes I found someone trying to solve the same issues (source), albeit compiling everything from scratch which I don't want to do. It turns out that the Retina display on my MacBook Pro was causing the issues with blurry fonts because Wine was not using the "real" resolution, only the reported "lower resolution".

To enable Retina support in Wine open the registry editor via a terminal, preferably through Wine Devel.app installed with Wine:
$ wine regedit

Then find the folder/key:

@chenshaoju
chenshaoju / script running adb shell
Last active March 25, 2024 04:58
Android 8.x Captive Portal Server for Mainland China
settings put global captive_portal_mode 1
settings put global captive_portal_use_https 1
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
settings put global captive_portal_fallback_url http://captive.v2ex.co/generate_204
settings put global captive_portal_other_fallback_urls http://www.google.cn/generate_204
@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active April 10, 2024 19:18
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@sorz
sorz / check_release.py
Last active May 12, 2018 13:57
Sending new release notification (via email) for GitHub repos.
#!/usr/bin/env python3
"""GitHub New Release Checker
./check_release.py path/to/releases.ini
It fetches release tag from GitHub, then comparing it with the
old one in ini file. If tag changed, send a email to configured
address.
"""
import re
@thales17
thales17 / msys2-SDL2-Setup.md
Last active April 14, 2024 07:20
msys2 sdl2 setup

Download and install msys2 64bit

Update msys2

  • Update msys2 64bit after install by running pacman -Syu if pacman needs to be updated you might have to close and reopen the terminal and run pacman -Syu again

Install build tools

  • pacman -S git mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_mixer mingw64/mingw-w64-x86_64-SDL2_image mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_net mingw64/mingw-w64-x86_64-cmake make

Compile Hello World

@grenade
grenade / disable-windefend.ps1
Created November 28, 2018 17:53
Disable Windows Defender
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableConfig' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableAntiSpyware' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\wscsvc' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\SecurityHealthService' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdBoot' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdFilter' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisDrv' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc' -name 'Start' -type 'Dword' -v
# This function will automate grep CMD($1) windows and set OPACITY($2).
transparent_windows() {
for i in $(pgrep -f $1); do
for j in $(/usr/bin/xdotool search --pid $i); do
xprop -id $j -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * $2 / 100)));
done
done
}
# Give vscode an alias.
@niw
niw / README.en.md
Last active May 10, 2024 05:50
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac