Skip to content

Instantly share code, notes, and snippets.

View jueti's full-sized avatar
🏠
Working from home

Jason Yang jueti

🏠
Working from home
View GitHub Profile
@valorad
valorad / Export-UntrustedGuardian.ps1
Last active June 14, 2024 08:09
Hyper-V TPM Migration (To solve error: "The key protector could not be unwrapped" that causes VM startup failure)
$GuardianName = 'UntrustedGuardian'
$CertificatePassword = Read-Host -Prompt 'Please enter a password to secure the certificate files' -AsSecureString
$guardian = Get-HgsGuardian -Name $GuardianName
if (-not $guardian)
{
throw "Guardian '$GuardianName' could not be found on the local system."
}
@Dreamacro
Dreamacro / ACMESH.md
Last active May 14, 2023 17:37
acme.sh docker-compose

How to use

$ docker-compose -f acmesh.yaml up -d
# Run once
$ docker exec -it acme --issue --dns dns_cf \
    -d \*.example.com \
    --key-file /certs/privkey.pem \
    --fullchain-file /certs/fullchain.pem \
 --standalone
@himalay
himalay / color-emoji-on-linux.sh
Created February 26, 2017 06:31
Color emoji on Arch Linux.
# create folders if does not exist
mkdir -p ~/.fonts
mkdir -p ~/.config/fontconfig/
# download noto color emoji font from https://www.google.com/get/noto/#emoji-zsye-color
# extract NotoColorEmoji.ttf file into ~/.fonts/
# create font config file
cat << 'EOF' > ~/.config/fontconfig/fonts.conf
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
@LeoMarX
LeoMarX / gist:ef1fca2c67f04b15fe6a376fa9683232
Created December 19, 2016 08:45
常用计算机词汇表.md
@carlosfunk
carlosfunk / install_python.ps1
Last active June 13, 2023 04:57
Powershell scripts for setting up a Python environment under Windows
# To run this file you will need to open Powershell as administrator and first run:
# Set-ExecutionPolicy Unrestricted
# Then source this script by running:
# . .\install_python.ps1
$save_dir=Resolve-Path ~/Downloads
$project_dir = "C:\Projects"
$virtualenv_dir = $project_dir + "\virtualenvs"
$client = New-Object System.Net.WebClient
@ndarville
ndarville / settings.py
Last active April 13, 2020 08:18
Django on Travis CI
"""A basic database set-up for Travis CI.
The set-up uses the 'TRAVIS' (== True) environment variable on Travis
to detect the session, and changes the default database accordingly.
Be mindful of where you place this code, as you may accidentally
assign the default database to another configuration later in your code.
"""
import os