Skip to content

Instantly share code, notes, and snippets.

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

snowdream snowdream

🏠
Working from home
View GitHub Profile
@snowdream
snowdream / golang-tls.md
Created May 18, 2023 12:59 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
FROM centos:latest
LABEL maintainer="snowdream <sn0wdr1am@icloud.com>"
ENV CPULIMIT_VERSION 0.2
ENV XMRIG_VERSION 5.3.0
RUN dnf groupinstall -y 'Development Tools' \
&& dnf install -y wget \
@snowdream
snowdream / .bashrc.sh
Last active August 14, 2019 16:33
阿里云Go Module代理仓库服务 https://mirrors.aliyun.com/goproxy/
# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://mirrors.aliyun.com/goproxy/
snowdream@R7000-C0CE:/tmp/mnt/MULTIBOOT/bin# entware-setup.sh
Info: This script will guide you through the Entware installation.
Info: Script modifies "entware" folder only on the chosen drive,
Info: no other data will be changed. Existing installation will be
Info: replaced with this one. Also some start scripts will be installed,
Info: the old ones will be saved on Entware partition with name
Info: like /tmp/mnt/sda1/jffs_scripts_backup.tgz
Info: Looking for available partitions...
[1] --> /tmp/mnt/MULTIBOOT
@snowdream
snowdream / gist:fca547c17fe483c44f0ec9b9f07adc87
Created November 5, 2016 07:24
mac电脑如何显示U盘里的隐藏文件
刚刚查到的正解:
第一步:打开[应用程序]-[终端]
第二步:在自动弹出来的一串字后面,输入如下命令:
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
第三步:按下「Return」键确认。
现在你将会在 Finder 窗口中看到那些隐藏的文件和文件夹了。
如果你想再次隐藏原本的隐藏文件和文件夹的话,将上述命令替换成
@snowdream
snowdream / arc_setup.sh
Last active August 4, 2016 03:56 — forked from makinde/arc_setup.sh
Arc Setup (Ubuntu)
#!/bin/bash
if ! hash git &> /dev/null || ! hash php &> /dev/null; then
echo -e " *****\n ***** INSTALLING GIT AND PHP\n *****"
if hash apt-get &> /dev/null; then
sudo apt-get install git-core php-cli php-curl
elif hash port &> /dev/null; then
sudo port install php-curl
elif hash fink &> /dev/null; then
file:
========================
q close
r reload
S save
p presentation
view:
========================
@snowdream
snowdream / apt-fast for ubuntu
Last active June 18, 2016 03:06
apt-fast for ubuntu
https://github.com/ilikenwf/apt-fast
Ubuntu 14.04 and later versions
sudo add-apt-repository ppa:saiarcot895/myppa
sudo apt-get update
sudo apt-get -y install apt-fast
@snowdream
snowdream / gist:d6a31d4b40858ed47e79
Created January 13, 2016 07:06
dos2unix整个目录
find . -type f -exec dos2unix {} \;
@snowdream
snowdream / genymotionwithplay.txt
Created January 6, 2016 08:48 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)