Skip to content

Instantly share code, notes, and snippets.

Ubuntu20.04 Wine 6.0 微信中文显示方块/方框

如果希望在Ubuntu使用Windows版微信:

  1. 安装 Wine sudo apt-get install wine
  2. 先把环境改了省事:
    $ export WINEARCH=win32
    $ export WINEPREFIX=/home/qinyu/Wine/WeChat
  3. 创建 Wine Bottle
@smiley-yoyo
smiley-yoyo / delete-from-v2-docker-registry.md
Created September 3, 2025 03:46 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@smiley-yoyo
smiley-yoyo / get-argocd-default-password.md
Created July 24, 2025 02:51 — forked from iambryancs/get-argocd-default-password.md
Get ArgoCD default admin password

Get ArgoCD default admin password

To get ArgoCD default admin password after installation, run:

kubectl -n argocd get secret argocd-initial-admin-secret \
          -o jsonpath="{.data.password}" | base64 -d; echo

The default admin user is admin.

@smiley-yoyo
smiley-yoyo / join_test.go
Created December 20, 2024 07:25 — forked from dtjm/join_test.go
Benchmarking various ways of concatenating strings in Go
package join
import (
"fmt"
"strings"
"testing"
)
var (
testData = []string{"a", "b", "c", "d", "e"}
@smiley-yoyo
smiley-yoyo / safe_time_rotating_file_handler.py
Last active June 17, 2024 11:32 — forked from SerhoLiu/safe_rotating_file_handler.py
python multiprocessing safe time rotating file handler
import logging
import os
import sys
import time
from logging.handlers import RotatingFileHandler, TimedRotatingFileHandler
from NamedAtomicLock import NamedAtomicLock
class MultiProcessLock(NamedAtomicLock):
@smiley-yoyo
smiley-yoyo / generics_aware_goimports.sh
Created April 8, 2024 02:13
How to build generics-aware goimports as of 2021/12/07
# In this script I'll use gotip, but there might be other ways
go install golang.org/dl/gotip@latest
# golang/go HEAD will be built
gotip download
# make sure gotip is available
gotip version
git clone https://github.com/golang/tools

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@smiley-yoyo
smiley-yoyo / enum.go
Last active February 16, 2022 09:12 — forked from lummie/enum.go
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@smiley-yoyo
smiley-yoyo / PYTHON_DEFAULT.md
Created March 22, 2021 06:54 — forked from patrickmmartin/PYTHON_DEFAULT.md
update-alternatives for python3 on Ubuntu

Ubuntu 16 default python is almost python 3

Loads of solutions exist, but for changing the system default, alias is not the way to go.

$ update-alternatives --list python update-alternatives: error: no alternatives for python