Skip to content

Instantly share code, notes, and snippets.

@yougg
yougg / monitor.go
Created May 12, 2020
Simple monitor for running multi process in docker scratch image
View monitor.go
//go:generate go build -trimpath -buildmode pie -installsuffix netgo -tags "osusergo netgo static_build" -ldflags "-s -w -extldflags '-static'" -o monitor ${GOFILE}
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
@yougg
yougg / qq_nickname.md
Last active Mar 25, 2020
通过QQ空间个人资料修改QQ昵称为空格过程记录
View qq_nickname.md
  1. 登陆自己的QQ空间 https://qzone.qq.com/

  2. 进入个人档,点击修改基本资料

  3. 在昵称处填入一个到多个Unicode空格

  4. 点击最下方的保存按钮,此时会弹框提示很抱歉,昵称不能全为空,请重新输入

    • 按Chrome F12或者Ctrl+Shift+I快捷键打开开发者工具窗口
    • 进入Network标签页,先点击Clear清理一下之前的请求记录
@yougg
yougg / hibernate.md
Last active Mar 25, 2020
Ubuntu 19.04 enable hibernate
View hibernate.md

Enable hibernate with swapfile on Ubuntu 19.04

Install hibernate and other dependencies which are needed to hibernate

sudo apt install hibernate

Create the swap file

@yougg
yougg / dump.go
Created Aug 16, 2019
Dump goroutine stack by signal
View dump.go
package dump
import (
"fmt"
"os"
"os/signal"
"runtime"
"syscall"
)
@yougg
yougg / deepin_non-free.md
Last active Mar 25, 2020
Ubuntu中通过Deepin软件源安装非自由软件 wps-office deepinwine-qq sogoupinyin等
View deepin_non-free.md

添加deepin软件源GPG key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 425956BB3E31DF51

添加deepin软件源中非自由软件

sudo add-apt-repository 'deb http://packages.deepin.com/deepin stable non-free'
@yougg
yougg / detectrun.go
Created Jun 20, 2019
Detect if windows golang executable file is running via double click or from cmd/shell terminator
View detectrun.go
// +build windows
//go:generate go build -ldflags "-s -w -extldflags '-static'" $GOFILE
package main
import (
"fmt"
"syscall"
"unsafe"
)
@yougg
yougg / hackddcat.sh
Last active Apr 8, 2020
多多猫 Android应用 破解VIP
View hackddcat.sh
#!/bin/bash
# 参考: https://www.52pojie.cn/thread-659866-1-1.html
cd `mktemp -d`
mkdir -p tool app
# 安装相关工具
cd tool
wget --no-check-certificate -O openjdk.tar.gz https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
wget --no-check-certificate https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
@yougg
yougg / acfun_emoji.sh
Last active Sep 8, 2019
AC娘表情包图片下载脚本
View acfun_emoji.sh
#!/bin/bash
#AC娘表情包 01-54
#http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ac/01.gif?v=0.1
#匿名版表情包 01-40
#http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ais/01.gif?v=0.1
#AC新娘表情包 01-55
#http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ac2/01.gif?v=0.1
@yougg
yougg / proxy.md
Last active Jul 6, 2020
complete ways to set http/socks/ssh proxy environment variables
View proxy.md

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
You can’t perform that action at this time.