Skip to content

Instantly share code, notes, and snippets.

View huwan's full-sized avatar

Hu Wan huwan

  • City University of Hong Kong
  • 23:59 (UTC +08:00)
View GitHub Profile
@huwan
huwan / new empty git branch.md
Created February 27, 2024 06:06 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@huwan
huwan / fly.toml
Created April 15, 2023 03:34 — forked from frostming/fly.toml
A Fly.io config file for OpenCat™ for Team that can be deployed directly
# fly.toml file generated for still-snowflake-6351 on 2023-03-30T09:53:40+08:00
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "sin"
processes = []
[build]
image = "bayedev/opencatd"
@huwan
huwan / bitbucket-pipelines.yml
Last active April 15, 2018 03:50 — forked from adujardin/bitbucket-pipelines.yml
Bitbucket pipeline file for latex document (including bibtex and upload to dropbox)
# SETTING UP :
# Generate an application token for your dropbox account and set it as environment variable named "DROPBOX_TOKEN"
# - https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/
# - https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html
# Set environment variable TEX_FILE according to the main tex file name
image: wanhu/texlive-basic:latest
pipelines:
default:
@huwan
huwan / bdcurl.sh
Created May 4, 2016 01:59 — forked from meoow/bdcurl.sh
百度云命令行(bash)上传下载脚本
#!/bin/bash
# Baidu Yun Command Line Interface
# Depends: bash, curl, grep, awk, sed, od
# (They are basicly builtin tools of any *nix system.)
# Additionally, fastupload depends: head, wc, md5sum or md5, cksum
# (Which are also builtin tools)
#### Variables ####