Skip to content

Instantly share code, notes, and snippets.

View schumitw's full-sized avatar

Schumi schumitw

  • Mitac Computing
  • Taipei, Taiwan
View GitHub Profile
@schumitw
schumitw / pr.md
Created December 10, 2021 01:05 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@schumitw
schumitw / progress-bar.sh
Created November 17, 2021 03:13
[Shell Script] Example
#/bin/sh
count=0
total=100
pstr="[=======================================================================]"
while [ $count -lt $total ]; do
sleep 0.01 # this is work
count=$(( $count + 1 ))
pd=$(( $count * 73 / $total ))
@schumitw
schumitw / Test.md
Last active November 17, 2021 01:24
Test

Test 2.