Skip to content

Instantly share code, notes, and snippets.

View yaochx's full-sized avatar
:octocat:
Focusing

Collin Yao yaochx

:octocat:
Focusing
  • BIGO
  • Beijing
View GitHub Profile

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

Error:
$ adb devices
List of devices attached
52003c2b58b445db no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]
Fix:
1> sudo usermod -aG plugdev $LOGNAME (https://developer.android.com/studio/run/device)
2> lsusb
3> sudo vi /etc/udev/rules.d/51-android.rules
@Meatplowz
Meatplowz / FBX_Scene.py
Last active April 29, 2024 10:12
This is a wrapper FBX class useful in accessing and modifying the FBX Scene
"""
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@dogancelik
dogancelik / ansi-utf8-conversion.md
Last active December 29, 2023 02:38
ANSI / UTF-8 (with or without BOM) conversion #Windows

Using Uni2Me

  • It's free but discontinued.

Using UTFCast

  • Proprietary software
  • Allows conversion from ANSI to UTF-8 with or without BOM

Using Notepad++

@ryerh
ryerh / tmux-cheatsheet.markdown
Last active April 18, 2024 18:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@diyism
diyism / 通过usb线把android手机变成无线路由器
Last active September 26, 2022 07:50
通过usb线把android手机变成无线路由器
#如果没有root的话(gateway没法设, dns也没法设), 则不使用系统的usb tethering而是使用gnirehtet而更简单些:
https://github.com/Genymobile/gnirehtet
sudo iptables -t nat -A OUTPUT -p udp ! -d 127.0.0.1 --dport=53 -j DNAT --to 192.168.0.25:53
./gnirehtet run
(可以设置unbound.conf的verbosity: 3<\n> logfile: unbound.log<\n> log-queries: yes 来观察是否生效, log文件位置可以用lsof -c unbound看到)
用来收android的更新包非常快, 打google voice也是这个gnirehtet+iptables可以用, 用手机上的lantern或wireguard应用都不行
#手机usb线连pc并启用tether
(manual switch on: settings/network & internet/hotspot & tethering/usb tethering
default on: settings/system/developer/networking/select usb configuration/rndis(usb ethernet)
@dgym
dgym / comic.py
Created May 7, 2013 12:15
A comic like effect using OpenCV
import sys
import numpy
import cv2
def comic(img):
# do edge detection on a grayscale image
gray = cv2.cvtColor(img, cv2.COLOR_BGRA2GRAY)
edges = cv2.blur(gray, (3, 3)) # this blur gets rid of some noise