Skip to content

Instantly share code, notes, and snippets.

View aimerneige's full-sized avatar
🎯
Keep Coding

Aimer Neige aimerneige

🎯
Keep Coding
View GitHub Profile
@kendellfab
kendellfab / golang-request
Created August 26, 2013 14:27
Golang Example for adding custom headers to a request.
client := &http.Client{]
req, err := http.NewRequest("POST", "http://example.com", bytes.NewReader(postData))
req.Header.Add("User-Agent", "myClient")
resp, err := client.Do(req)
defer resp.Body.Close()
@hyg
hyg / gist:9c4afcd91fe24316cbf0
Created June 19, 2014 09:36
open browser in golang
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@stableShip
stableShip / 详细设计文档编写规范
Created July 1, 2016 01:23
详细设计文档编写规范
## 一.引言
### 1. 编写目的(阐明编写详细设计说明书的目的,指明读者对象。)
### 2. 项目背景(应包括项目的来源和主管部门等。)
### 3. 定义(列出文档中用到的专门术语定义和缩写词的原意。)
### 4. 参考资料(列出这些资料的作者、标题、编号、发表日期、出版单位或资料来源,可包括:(1)项目的计划任务书,合同或批文;(2)项目开发计划;(3)需求规格说明书;(3)概要设计说明书;(4)测试计划(初稿);(5)用户操作手册(初稿);(5)文档所引用的其他资料、软件开发标准或规范。)
## 二.总体设计
### 1.需求概述
@beta
beta / betaType.ini
Last active October 29, 2020 12:59
betaType: My custom MacType configurations.
; betaType
; https://gist.github.com/beta/8552d043e70cc214e34c68c25151f59c
[General]
Name=betaType
DirectWrite=1
HookChildProcesses=1
HintingMode=1
AntiAliasMode=1
@timothystone
timothystone / zprofile-proxy.txt
Created November 23, 2017 00:39
How I set my proxy in ZSH
#in ZSH, add to ~/.zprofile
set_http_proxy() {
if [ -e $HOME/.proxyrc ]; then
. $HOME/.proxyrc
fi
if [ -z $http_proxy ]; then
echo "No proxy config, environment found, connection attempt failed."
echo "Let's setup a config or update your password."
@primaryobjects
primaryobjects / m3u8.md
Last active July 15, 2024 01:54
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@mayufo
mayufo / 验证中国身份证 前6位对应地区码
Created January 16, 2018 10:12
验证中国身份证 前6位对应地区码
var GB2260 = {
"110000": "北京市",
"110100": "北京市市辖区",
"110101": "北京市东城区",
"110102": "北京市西城区",
"110103": "北京市崇文区",
"110104": "北京市宣武区",
"110105": "北京市朝阳区",
"110106": "北京市丰台区",
"110107": "北京市石景山区",
@bradtraversy
bradtraversy / myscript.sh
Last active July 16, 2024 10:39
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"

ShadowsocksR 协议插件文档


概要

用于方便地产生各种协议接口。实现为在原来的协议外套一层编码和解码接口,不但可以伪装成其它协议流量,还可以把原协议转换为其它协议进行兼容或完善(但目前接口功能还没有写完,目前还在测试完善中),需要服务端与客户端配置相同的协议插件。插件共分为两类,包括混淆插件和协议定义插件。

现有插件介绍

1.混淆插件

@j-un
j-un / spotify.html
Last active June 11, 2024 03:14
[Hugo] Shortcode for Spotify embed code
<!--
Parameters:
type - (Required) album / track / playlist / artist
id - (Required) Target ID
width - (Optional) width
height - (Optional) height
-->
{{ if .IsNamedParams }}
<iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}"