Skip to content

Instantly share code, notes, and snippets.

View qmdx00's full-sized avatar
🖥️
Learning ...

Wimi Yuan qmdx00

🖥️
Learning ...
  • ShenZhen
  • 15:34 (UTC +08:00)
View GitHub Profile
@qmdx00
qmdx00 / git.plugin.zsh
Last active September 29, 2022 03:30
ohmyzsh git alias
#
# Aliases
# (sorted alphabetically)
#
alias g='git'
alias ga='git add'
alias gaa='git add --all'
alias gapa='git add --patch'
@qmdx00
qmdx00 / options.go
Last active September 29, 2022 03:27
golang option pattern
package main
import (
"fmt"
"time"
)
type Option func(opts *Options)
var defaultConfig = Options{
@qmdx00
qmdx00 / bash_proxy
Created April 18, 2020 04:21
linux shell proxy config
# where proxy
proxy () {
export http_proxy="http://127.0.0.1:1086"
export https_proxy="http://127.0.0.1:1086"
echo "HTTP Proxy on"
}
# where noproxy
noproxy () {
unset http_proxy
@qmdx00
qmdx00 / powershell_proxy
Created April 18, 2020 04:19
windows powershell proxy config
# file path:
# ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function Set-Proxy
{
$proxy = 'http://127.0.0.1:1086'
# temporary
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy
@qmdx00
qmdx00 / gogs
Last active August 27, 2019 09:49
gogs docker-compose
version: '3.3'
services:
gogsdb:
image: mysql:latest
container_name: gogsdb
restart: always
environment:
MYSQL_DATABASE: gogs
MYSQL_ROOT_PASSWORD: gogs
MYSQL_USER: gogs