Skip to content

Instantly share code, notes, and snippets.

View justin3737's full-sized avatar
🎯
Focusing

Justin justin3737

🎯
Focusing
View GitHub Profile
@justin3737
justin3737 / diagonal-stripe-mixin.sass
Created December 17, 2016 01:54 — forked from nathos/diagonal-stripe-mixin.sass
Diagonal CSS stripe Sass/Compass mixin.
@mixin striped-bg($bg-color: #ccc, $darken-amount: 5%, $stripe-color: darken($bg-color, $darken-amount))
background-color: $bg-color
@include background-image(linear-gradient(-45deg, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent))
background-size: 40px 40px
.warning
font-family: sans-serif
font-weight: bold
color: #333
text-align: center
@justin3737
justin3737 / html_table_import_csv.py
Last active March 21, 2018 06:19
CMD帶入引數 利用BS4爬出表格內容 並輸出CSV
import codecs
import argparse
from bs4 import BeautifulSoup
#在CMD取得引數
parser = argparse.ArgumentParser()
parser.add_argument("-name") #<file_name.py> -name "html檔名"
args = parser.parse_args()
#讀取 HTML 靜態頁
@justin3737
justin3737 / crawler.py
Created March 21, 2018 06:22
利用Python的爬蟲與Chrome driver 爬中央氣象局網頁
from selenium import webdriver
chromedriver = "/Users/justin_w_wu/Documents/www/drivers/chromedriver"
web = webdriver.Chrome(chromedriver)
web.get('http://www.cwb.gov.tw/V7/')
web.find_element_by_link_text('生活氣象').click() #點擊頁面上"天氣預報"的連結
@justin3737
justin3737 / spell_check.py
Last active February 27, 2022 07:38
利用python 的 enchant 做拼字檢查
import enchant
from xml.dom.minidom import parse
import xml.dom.minidom
import js2py
import re
# ------------------- Define -------------------
pat = '[a-zA-Z]+'
xmlTags = ['String', 'value', 'string']
# ------------------- Use lib -------------------
#!/usr/bin/env node
console.log('yay gist')
<html>
<head>
<title>拖曳物件</title>
</head>
<style>
.drop-area {
border: 1px solid black;
width: 300px;
height: 300px;