Skip to content

Instantly share code, notes, and snippets.

@4wk-
4wk- / README.md
Last active October 6, 2025 17:24
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@buananetpbun
buananetpbun / Port Knocking Maker or Generator Icmp + Packet Size
Created December 27, 2021 03:00
Port Knocking Maker or Generator Icmp + Packet Size
How Port Knocking Maker - Mikrotik Script RouterOS
In computer networking, port knocking is a method of externally opening ports on a firewall by generating a connection attempt on a set of prespecified closed ports. Once a correct sequence of connection attempts is received, the firewall rules are dynamically modified to allow the host which sent the connection attempts to connect over specific port(s). A variant called single packet authorization (SPA) exists, where only a single "knock" is needed, consisting of an encrypted packet.
The primary purpose of port knocking is to prevent an attacker from scanning a system for potentially exploitable services by doing a port scan, because unless the attacker sends the correct knock sequence, the protected ports will appear closed
###########################################################
# Mikrotik Port Knocking Generator with Icmp + Packet Size
# Date/Time: 2/14/2021, 12:14:10 PM
# https://fb.me/buananet.pbun
##################################################
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active October 15, 2025 00:28
Building a react native app in WSL2
@yuche
yuche / 小程序多端框架到底应该选哪个.md
Last active March 26, 2023 16:18
小程序多端框架到底应该选哪个?

小程序多端框架到底应该选哪个?

最近前端届多端框架频出,相信很多有代码多端运行需求的开发者都会产生一些疑惑:这些框架都有什么优缺点?到底应该用哪个?

作为 Taro 开发团队一员,笔者想在本文尽量站在一个客观公正的角度去评价各个框架的选型和优劣。但宥于利益相关,本文的观点很可能是带有偏向性的,大家可以带着批判的眼光去看待,权当抛砖引玉。

那么,当我们在讨论多端框架时,我们在谈论什么:

多端

笔者以为,现在流行的多端框架可以大致分为三类:

@shirakaba
shirakaba / setup.md
Last active October 5, 2025 13:54
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

@mozillazg
mozillazg / supervisord.service
Last active March 16, 2025 07:43 — forked from tonyseek/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@janlay
janlay / README.md
Last active March 20, 2025 13:05
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
anonymous
anonymous / Douban_z
Created July 14, 2014 13:57
豆瓣小组—图片采集—练习
#-*- coding: utf-8 -*
import urllib
import urllib2
import re
import time
import sys
#解决中文报错
reload(sys)
sys.setdefaultencoding('utf-8')
@nghuuphuoc
nghuuphuoc / 1) Install
Last active September 4, 2023 09:29
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm