This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# paste it in .zshrc bottom | |
get_gitignore () { | |
# get_gitignore python | |
# get_gitignore node | |
# get_gitignore java | |
TEST=$1 | |
# echo ${TEST:0:1} | tr [:lower:] [:upper:] | |
LEFT_MOST=`echo ${TEST:0:1} | tr '[:lower:]' '[:upper:]'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:atareao/atareao | |
sudo apt-get update | |
sudo apt-get install my-weather-indicator | |
sudo apt-get install filezilla | |
sudo apt-get install neofetch | |
sudo apt install kicad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:atareao/atareao | |
sudo apt-get update | |
sudo apt-get install my-weather-indicator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu python3-pip problem and solver | |
error message: | |
Traceback (most recent call last): | |
File "/usr/bin/pip3", line 9, in <module> | |
from pip import main | |
ImportError: cannot import name 'main' | |
To solve: | |
#!/usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# origional link: https://chrisdown.name/2015/09/27/auto-merging-successful-builds-from-travis-ci.html | |
# BRANCH_TO_MERGE_REGEX is a regex that the current branch should match if a merge will take place. In my case, I limit it to feature branches (marked with f/), as there might be other branches I want to stick around without merging. | |
# BRANCH_TO_MERGE_INTO is the branch to merge into as part of deployment. I use two branches; master, which contains the latest stable code, and deploy, which contains the development code. In my case, I merge into deploy on successful build. | |
# GITHUB_REPO is the repo path that is being pushed to. For example, cdown/srt in this case. | |
# The script also needs GITHUB_SECRET_TOKEN, but that will be provided by the secret we generated above. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
about-scheme | |
chrome-extension-scheme | |
chrome-scheme | |
moz-extension-scheme | |
opera-scheme | |
vivaldi-scheme | |
wyciwyg-scheme | |
127.0.0.1 | |
alipay.com | |
aliwangwang.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("hello_gist_body"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://github.com/muan/emojilib (simplemap.json) | |
var EMOJI = { | |
"100": "💯", | |
"1234": "🔢", | |
"grinning": "😀", | |
"grimacing": "😬", | |
"grin": "😁", | |
"joy": "😂", | |
"smiley": "😃", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# sh <(curl https://gist.githubusercontent.com/louiscklaw/80717b71ac09ea6d53204dfcc4da1eac/raw/80b4256737234b7598802e10115b8a848ad574e4/helloworld.sh -L -s) test | |
echo "$*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RTHK31 | |
rthk31 () { | |
link=$(curl -s -L https://www.rthk.hk/feeds/dtt/rthktv31_https.m3u8 | python2 -c 'import sys; list=sys.stdin.readlines(); print list[list.index("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2180000,RESOLUTION=1280x720,CODECS=\"avc1.66.30, mp4a.40.2\""\n")+1]') && mpv $link & | |
} | |
# RTHK32 | |
rthk32 () { | |
link=$(curl -s -L https://www.rthk.hk/feeds/dtt/rthktv31_https.m3u8 | python2 -c 'import sys; list=sys.stdin.readlines(); print list[list.index("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2148000,RESOLUTION=1280x720,CODECS=\"avc1.66.30, mp4a.40.2\"\n")+1]') && mpv $link & | |
} |