Skip to content

Instantly share code, notes, and snippets.

View Zhwt's full-sized avatar
┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻

Zhwt Zhwt

┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻
  • Earth
View GitHub Profile
@ishad0w
ishad0w / microsoft_edge_uninstaller_21h1_ltsc.bat
Last active June 30, 2024 09:26
Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
@echo off
@title Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
ver
echo+
goto check_admin_permissions
:check_admin_permissions
echo Script must Run as Administrator! Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
@sindresorhus
sindresorhus / esm-package.md
Last active July 23, 2024 10:30
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@juergenhoetzel
juergenhoetzel / utf16.go
Created December 8, 2018 09:43
Decode utf16 (little or big endian) to string
package main
import (
"bytes"
"encoding/binary"
"fmt"
"unicode/utf16"
)
func DecodeUtf16(b []byte, order binary.ByteOrder) (string, error) {
@RoomArchitect
RoomArchitect / update-miwifi-with-shadowsocks.md
Created May 3, 2017 07:15 — forked from rambolee/update-dnsmasq-from-gfwlist.py
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 23, 2024 12:13
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
import sys
import json
import SocketServer
SocketServer.TCPServer.allow_reuse_address = True
class MCHandler(SocketServer.BaseRequestHandler):
@classmethod
def pack_varint(cls, d):
@bradleypeabody
bradleypeabody / gist:185b1d7ed6c0c2ab6cec
Last active November 29, 2023 22:08
golang, convert UTF-16 to UTF-8 string
package main
// http://play.golang.org/p/fVf7duRtdH
import "fmt"
import "unicode/utf16"
import "unicode/utf8"
import "bytes"
func main() {
@UniIsland
UniIsland / list-manually-installed-packages.sh
Created February 8, 2014 08:20
List all manually installed packages on a debian/ubuntu system
#!/bin/bash
## List all manually installed packages on a debian/ubuntu system
## manually installed means:
## 1. not pre-installed with the system
## 2. not marked auto-installed by apt (not dependencies of other
## packages)
## Note: pre-installed packages that got updated still needs to be
## filtered out.
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.