Skip to content

Instantly share code, notes, and snippets.

@bramtechs
bramtechs / upgrade-debian-wsl.md
Last active June 18, 2024 11:53
Upgrade Debian 9, (current WSL) to Debian 12 (bookworm testing)

Upgrade Debian 9 (current WSL) to Debian 12 (bookworm testing)

Note: I do not maintain this gist anymore, but people report that it still works. Please check the comments for any revisions or extra things you should take into consideration.

As of writing, the Debian distro for WSL (Windows Subsystem for Linux) is quite old.

You can get more up-to-date package managers, text-editors and compilers by upgrading WSL to Debian 12 (current testing).

  • Root required
  • Use at your own risk, preferably on a fresh installation.
@jesliwang
jesliwang / UnpackUnityAssets.py
Last active April 7, 2024 02:34
Unpack Assets For Unity Games From Apks or assetbundles
#!/Users/Jesli/opt/anaconda3/bin/python
# -*- coding: UTF-8 -*-
import io, os
import UnityPy
import sys, getopt
import traceback
import json
class UnPackUnityAsset:
@datocrats-org
datocrats-org / setupDevEnv_workaroundWSL2vhdxLimit.md
Last active March 30, 2024 14:36
Backup and restore WSL2 vhdx, avoid 256GB vhdx limit for docker desktop WSL2 native

Backup and restore WSL2 vhdx, avoid 256GB vhdx limit for docker desktop WSL2 native

Review all steps to view the symptom this Gist addresses, customize a workaround to allow for >256GB Docker pulls safely on Windows, then perform a backup and recovery of the result (export and import). Please provide comments on any failures.

Determine the expected size of the docker-desktop-data volume

  • Get the base image size + additional + all docker volumes using docker system df
  • Add raw uncompressed size for alpine (50MB), docker for your version of windows (700MB) and linux (80MB)

docker system df

@jjsanderson
jjsanderson / network-manager-raspbian-2020-02-05.md
Last active April 20, 2023 17:25
Installing Network Manager on Raspbian 2020-02-05

Installing Network Manager on Raspbian 2020-02-05

NOTE:
This guide was written more than two years ago, which in Pi years means it's now graduated college, or something. Inevitably, it's at least a little out of date, and it may even be entirely misleading. There are several helpful suggestions in the comments (thanks everyone), and most recently a report that what's here plain doesn't work on current (early 2022) Raspbian. Which isn't even called 'Raspbian' any more.
As of Jan 2022 I'm partially back in my office-which-has-access-to-eduroam, and I do have a need to build up a fresh Pi desktop. If and when I get that working I'll update this guide. In the meantime: good luck, and please leave a comment to report success or failure.
(June 2022) Nope, I still haven't actually tried any of this myself. However, I have had to troubleshoot eduroam wifi on my Linux ThinkPad. As of Ubuntu 22.04 it would no longer connect. [This Stack Exchange answer](https://askubuntu.com/questions/27976

@qzm
qzm / aria2.conf
Last active June 6, 2024 19:23
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@thetdg
thetdg / install_python_termux_android.txt
Last active June 3, 2024 04:05
Installing Full Scipy Stack on Android
# Updated on 2021-01-29
pkg install util-linux clang llvm nano wget autoconf automake bison bzip2 cmake coreutils diffutils flex gawk git grep gzip libtool make patch perl readline-dev sed silversearcher-ag tar python python-dev fftw libzmq libzmq-dev freetype freetype-dev libpng libpng-dev libjpeg-turbo-dev glib pkg-config zlib zlib-dev
$PREFIX/bin/wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
pkg update
@chenshaoju
chenshaoju / PowerCheck.bat
Last active November 9, 2023 01:26
Windows停电自动关机批处理脚本
@echo off
REM 注意:此脚本需要在执行的计算机具备UPS为前提的条件下进行,且目标IP设备不能具有UPS。
REM 此批处理可以检测目标IP是否因为停电而失效,一旦失效则在180秒后关机。
REM 需将此批处理写入计划任务才能使用,建议每隔60秒执行一次。
REM 若不知道如何配置计划任务,请参阅 https://twitter.com/chenshaoju/status/973109556640333825
REM 若参照60秒执行一次的话,在120至180秒内若恢复供电(能Ping通),则会取消关机。
REM 若路由器或需要检测的目标IP不是 192.168.1.1 ,请手动修改下方的 192.168.1.1 IP地址。
REM 关机等待时间不建议设置太短,避免手动开机但目标IP未启动时又立刻自动关机。
REM 若只需要监控一个设备(默认),请勿注释下一行。
@FranklinYu
FranklinYu / README.markdown
Last active June 17, 2024 04:06
links for old versions of Docker for Mac (inspired by docker/for-mac#1120)

links for old versions of Docker for Mac

Deprecated

Docker provides download links in release note. They promised that

(we) will also include download links in release notes for future releases.

Note:

@matheusagcosta
matheusagcosta / podbot.md
Last active December 25, 2022 11:58
Podbot Counter Strike 1.6 on Mac OSX

1 - Make sure you have Counter Strike installed

2 - Download YAPB http://forums.bots-united.com/showthread.php?t=9986

3 - Extract the zip and move the folder addons with all the content to ~/Library/Application Support/Steam/steamapps/common/Half-Life/cstrike

4 - After that, open the file liblist.gam in the folder above and replace gamedll_osx "dlls/cs.dylib" with this content:

//gamedll_osx "dlls/cs.dylib"