Skip to content

Instantly share code, notes, and snippets.

ChenYuan zjuchenyuan

View GitHub Profile
say you have a private repo, which is not suitable for push to github
but you want github to show your activity for this repo
so, this script will help you sync commit message to `githubrepo`, using empty commits
used commands:
git log --all '--pretty=format:%ad|%s'
git commit -m "message" --date "Sun Jun 17 12:48:07 2018 +0800" --allow-empty
ImSingee /
Created Apr 15, 2018
import re
import json
from mitmproxy import ctx
from urllib.parse import quote
from pprint import pformat
def response(flow):
path = flow.request.path
if path == '/index/index_one_nine_two/make_question':'Start')
magisterquis / demoshell.go
Last active Jul 13, 2020
Beaconing shell, useful for demos. Catch it with netcat.
View demoshell.go
// demoshell is a nifty beaconing shell useful for demos
package main
* demoshell.go
* Simple reverse shell used in demos
* By J. Stuart McMurray
* Created 20180331
* Last Modified 20180331
francisfeng /
Last active Jan 20, 2020
Things You Should Ask HR

Things You Should Ask HR


为了尽量避免入职后才发现公司有不合意的地方,我根据经验,写下此 gist,包含「必问问题」、「工作相关」、「生活相关」三个列表。




fzls /
Last active May 8, 2019
import re
import requests
from bs4 import BeautifulSoup
# 赠送的网址(post)
exchange_url = ""
# 98的帖子网址
cc98_url = ""
View 无声启动器.c
// 程序启动器[win32]
// 一个小玩意,作用就是读取与 exe 同名的 .config 文件,并逐条并行执行,不显示窗口
// 以 # 打头的行忽略
// 用于开机挂载一些自带 cmd 窗口的程序
// 自用 vs2017 编译测试通过
// ver 1.1
// 一个新语法:@命令 可以等待此命令结束后再继续运行
// 例如 @ping 127.1 -n 3 等待3秒
mgeeky /
Last active Jul 11, 2020
Script to manage auto-snapshots for specified VirtualBox VM. Able to rotate snapshots, create, restore and delete ones.
# vim: ts=4 sw=4 et
# Auto-snapshotting script intended to be cron'ed,
# taking automatic snapshots of particular VM, logging that actions,
# and providing means of restoring specific snapshots.
# Included with functionality of rotating them (like logrotate).
# Example cron entry for this script:
chichunchen / wget 中文亂碼
Created Jan 26, 2015
用 wget 从服务器下载文件经常遇到中文文件名变成乱码的问题。
View wget 中文亂碼
其实不必要像那样修改源代码,wget 的 man 页面里就有解决方法。
正解是参数 --restrict-file-names=nocontrol
Update: +筱百合 提供了他的 ~/.wgetrc 文件,方便大家借鉴:
# 不要乱转义中文
# 使用重定向后的文件名
quark-zju /
Last active Apr 13, 2020
Trace all function calls using gdb
#!/usr/bin/env python
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb:
gubatron /
Last active Jul 14, 2020
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

You can’t perform that action at this time.