Skip to content

Instantly share code, notes, and snippets.

View flyhigher139's full-sized avatar
🖥️
working

Gevin flyhigher139

🖥️
working
View GitHub Profile
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 20, 2024 14:39
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@rambolee
rambolee / xiaomi-tv-3-root-youtube-note.md
Last active November 22, 2021 02:48
[小米盒子3 增强版 : Root + Youtube 配置笔记]小米盒子3 增强版 : Root + Youtube 配置笔记 #小米盒子3增强版 #小米盒子3 #root #youtube #kingroot #Google

小米盒子3 增强版 : Root + Youtube 配置笔记

前提

  • 路由器已经「移民」,参考 这篇 Gist

  • 别人家的效果图(新的 MIUI -- 应用部分展示略有不同)

  • 当前成功(有效)方案实现日期:2017年10月08日

@rambolee
rambolee / update-dnsmasq-from-gfwlist.py
Last active May 2, 2024 01:27
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())
@katopz
katopz / setup.sh
Last active November 29, 2016 13:43
For setup 3 MongoDB replica set in Docker container and use data volume for db. will need https://gist.github.com/katopz/0f553b431302d9313ebfa7d48b53db89
## Setup Docker
NETWORK_NAME=${1:-my-mongo-cluster}
REPLICASET_NAME=${2:-my-mongo-set}
# Disconnect old container if has.
docker network disconnect -f $NETWORK_NAME mongo0
docker network disconnect -f $NETWORK_NAME mongo1
docker network disconnect -f $NETWORK_NAME mongo2
# Remove old network if has.
docker network rm $NETWORK_NAME
@katopz
katopz / setup-container.sh
Created July 22, 2016 14:48
For setup Docker container and use data volume for db.
#!/bin/bash
CONTAINER_INDEX=$1
CONTAINER_NAME="mongo"$1
DATA_VOLUME="mongo-data-volume"$1
mkdir $CONTAINER_NAME
DB_PORT=$((30000+$CONTAINER_INDEX))
HTTP_PORT=$((28017+$CONTAINER_INDEX))
NETWORK_NAME=$2
REPLICASET_NAME=$3
@ericclemmons
ericclemmons / example.md
Last active July 17, 2024 06:50
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@jason5ng32
jason5ng32 / surge.conf
Last active April 7, 2024 13:04
Surge Configs ( for 2.x )
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
@janlay
janlay / README.md
Last active May 11, 2024 03:22
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@datagrok
datagrok / README.md
Last active June 6, 2021 14:23
Circular imports in Python 2 and Python 3: when are they fatal? When do they work?