Skip to content

Instantly share code, notes, and snippets.

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

yaochx

:octocat:
Focusing
  • HongKong
  • 19:47 (UTC -12:00)
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
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active November 18, 2024 02:39
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@Meatplowz
Meatplowz / FBX_Scene.py
Last active August 13, 2024 17:08
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 May 14, 2024 04:09
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 October 30, 2024 08:09 — 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