Skip to content

Instantly share code, notes, and snippets.

View wangjiezhe's full-sized avatar
🏠
Working from home

Jiezhe Wang wangjiezhe

🏠
Working from home
View GitHub Profile
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@magnusbae
magnusbae / git-stop-tracking-remote-branch.md
Created April 8, 2014 20:05
How to make Git stop track a remote branch without deleting the remote branch.

You don't have to delete your local branch.

Simply delete your remote tracking branch:

git branch -d -r origin/<remote branch name> (This will not delete the branch on the remote repo!)

See "Having a hard time understanding git-fetch"

there's no such concept of local tracking branches, only remote tracking branches.

@likewhoa
likewhoa / ecatalyst.sh
Created April 27, 2014 01:58
A script that allows you to chroot into a failed catalyst environment to fix errors manually.
#!/bin/bash
# Help menu
print_help() {
cat <<-HELP
Arguments:
--spec - --spec=stage1.spec (default)
--config - --config=/etc/catalyst.conf (default)
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
# LaTeX Files
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
@wangjiezhe
wangjiezhe / unzip3_gbk.py
Last active February 17, 2021 14:00
解决zip文件中文乱码问题
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
unzip3_gbk.py: Deal with zip files using encoding GB2312/GBK/GB18030
"""
import os
# import sys
import argparse
import zipfile
import requests
from db import db
"""
The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2
Base url: https://api.douban.com/v2
Group info: /group/:id
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@joshuamiller
joshuamiller / flavor.rb
Last active March 23, 2017 22:35 — forked from ttscoff/flavor.rb
#!/usr/bin/ruby
# encoding: US-ASCII
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
#
# Requirements: json gem (`gem install json`)
#
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
@tvvocold
tvvocold / slides.fdzh.org - 在云端的泡泡糖
Last active May 5, 2017 15:49
slides.fdzh.org-请自定义文件名
<section data-background-transition='zoom' data-transition='concave' data-background='http://fdorg.qiniudn.com/galaxy-10996_1280.jpg' data-state='blackout'>
<h1>在云端的泡泡糖</h1>
<h4>slides.fdzh.org</h4>
<p>请按 空格 或点击 右下角方向键 继续演示...</p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
<h2>如何使用?</h2>
<p>仅需 Fork 一份 Gist </p>
<a href='https://gist.github.com/tvvocold/30e2848f2ba2a294ab28'>https://gist.github.com/tvvocold/30e2848f2ba2a294ab28</a></p>