Skip to content

Instantly share code, notes, and snippets.

View sh7ning's full-sized avatar
👊
Go !

Shine Yim sh7ning

👊
Go !
View GitHub Profile
#!/usr/bin/env bash
function mac() {
export CGO_ENABLED=1
export CC=clang
export CXX=clang++
export GOOS=darwin
export GOARCH=amd64
}
@zzjtnb
zzjtnb / Telegram解决+86不能私聊其他用户的方案:
Created November 18, 2018 08:09
@SpamBot 提出申请半小时内即可解开
Telegram 给某人发送私聊消息时遇到如下提示:
Sorry,you can only send messages to mutual contacts at the momet.
中文:抱歉,您现在只能给双向联系人发送消息。
原因:
前段时间币圈利用Telegram 的便利,大量发广告和拉人进群。Telegram 限制了+86 大陆手机号绑定的账号的私聊。
+86 的账号不能给非+86 的账号主动发起私聊,+86 的账号能给+86 主动发起私聊的;刚刚注册的+86 账号也不能发起私聊的,过段时间就OK了。
解决办法:
1. 两个人建立一个群来作为私聊交流
@BretFisher
BretFisher / docker-for-mac.md
Last active July 9, 2024 11:29
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@willshiao
willshiao / aes.go
Last active July 2, 2024 11:48
AES 256-CFB in Node.js, Go, and Python
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"fmt"
"io"
@ccbikai
ccbikai / unsplash.py
Last active December 31, 2019 12:15
unsplash 全站下载脚本
# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# unsplash 全站下载脚本
# 请先安装 requests ,BeautifulSoup
# pip install requests beautifulsoup4
# 运行 python unsplash.py
# 输入最小页数和最大页数