Skip to content

Instantly share code, notes, and snippets.

View ihidchaos's full-sized avatar

GuoYuchao ihidchaos

  • HooRii Technology Co., Ltd
  • China
  • 05:13 (UTC +08:00)
View GitHub Profile
{
"pkg": {
"name": "pkg_name",
"category": "dev_tool",
"desc": "say something",
"maintainer": "who you are",
"contact": "anything"
},
"link": {
"link_main": "git or script or others which can get dl link",
@ihidchaos
ihidchaos / git_proxy
Last active December 26, 2019 02:37 — forked from chuyik/README.md
Git(Github) 设置代理(HTTP/SSH)
#!/bin/bash
#proxy for wsl
CMD=$1
echo "Choose:" $CMD
set()
{
git config --global http.proxy "http://192.168.123.63:7891"
git config --global https.proxy "http://192.168.123.63:7891"
export http_proxy=http://192.168.123.63:7891
sudo apt install -y cmake gcc clang gdb valgrind build-essential
@ihidchaos
ihidchaos / py2pyc.py
Created November 7, 2019 17:25
py2pyc
import compileall
import os
import shutil
import tarfile
from pathlib import Path
keyword = '.cpython-37'
temp = 'publish'
app = 'app'
@ihidchaos
ihidchaos / format.go
Created March 6, 2020 08:56
datatype transformer
package drivers
import (
"encoding/binary"
"encoding/hex"
"github.com/shopspring/decimal"
"math"
"strings"
)
@ihidchaos
ihidchaos / ubuntu_docker_mirror
Last active October 14, 2020 15:04
ubuntu_docker_mirror
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's/security.ubuntu/mirrors.aliyun/g' /etc/apt/sources.list
sudo sed -i 's/us.archive.ubuntu/mirrors.aliyun/g' /etc/apt/sources.list
sudo apt update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get -y update
sudo apt-get -y install docker-ce
sudo bash -c 'cat << EOF > /etc/docker/daemon.json
@ihidchaos
ihidchaos / portainer_influxd_chronograf_mysql
Last active May 3, 2020 13:50
portainer_influxd_chronograf_mysql
docker run -d -p 9000:9000 \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
--name portainer \
docker.io/portainer/portainer
docker network create influxdb
docker run -d -p 8086:8086 --name=influxdb --net=influxdb --restart=always influxdb
@ihidchaos
ihidchaos / find_grep
Last active October 24, 2020 14:22
find_grep
find . -type f | xargs grep "some string" -il
@ihidchaos
ihidchaos / mosquitto_cross_compile.sh
Last active June 30, 2020 01:12
mosquitto_cross_compile.sh
git clone https://github.com/eclipse/mosquitto.git
cd mosquitto
make CC=mips-openwrt-linux-gcc CXX=mips-openwrt-linux-g++ WITH_STATIC_LIBRARIES=yes WITH_TLS=no -j8
@ihidchaos
ihidchaos / cjson_cross_compile
Created July 3, 2020 09:10
cjson_cross_compile
git clone https://github.com/DaveGamble/cJSON.git
cd cJSON
make CC=mips-openwrt-linux-gcc