Skip to content

Instantly share code, notes, and snippets.

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

Jim yysu

🏠
Working from home
  • Taipei, Taiwan
View GitHub Profile
@yysu
yysu / unzip_all.py
Created May 29, 2018 08:15 — forked from kalkulus/unzip_all.py
PYTHON: unzip all files in a directory
#!/usr/bin/python
import os, zipfile
for filename in os.listdir("."):
if filename.endswith(".zip"):
print filename
name = os.path.splitext(os.path.basename(filename))[0]
if not os.path.isdir(name):
try:
zip = zipfile.ZipFile(filename)
@yysu
yysu / incept-minikube.sh
Created April 22, 2018 04:31 — forked from osowski/incept-minikube.sh
Install Minikube, Kubectl, and Virtualbox on Ubuntu
#Installing VirtualBox
echo "Installing VirtualBox........................"
sudo apt-get install virtualbox
#Installing kubectl https://kubernetes.io/docs/getting-started-guides/kubectl/
echo "Installing kubectl..........................."
wget https://storage.googleapis.com/kubernetes-release/release/v1.4.4/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
@yysu
yysu / Regular.md
Created July 28, 2017 08:43 — forked from dz1984/Regular.md
這篇收藏起來,以備不時之需。

資料來源:http://disp.cc/b/11.cj-2q1S

Regular expression: 貪婪、非貪婪

貪婪與非貪婪

當要抓取一段不固定的字串,例如 <b></b> 中間的字。 最常看到的方法就是使用正規表示式 regular expression (以下簡稱 regex):