Skip to content

Instantly share code, notes, and snippets.

@michaelHL
michaelHL / bb.ipynb
Last active November 19, 2018 10:54
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaelHL
michaelHL / selenium_lagou.py
Created August 19, 2018 09:58
selenium 爬取拉勾网内容
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import json
import time
def lagou_search_url(keyword, city, district=None):
url_base = 'https://www.lagou.com/jobs/'
if district:
return (url_base + 'list_' + keyword
@michaelHL
michaelHL / portable_chrome_selenium_test.py
Created August 18, 2018 03:35
Python Selenium 使用非默认路径 Chrome
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
import time
chrome_options = Options()
chrome_options.binary_location = 'Chrome/chrome.exe'
webdriver_path = 'Utils/chromedriver.exe'
driver = webdriver.Chrome(
/**
* 2018 年刑侦科推理试题
*
* 1. 这道题的答案是:
* A. A B. B C. C D. D
*
* 2. 第 5 题的答案是:
* A. C B. D C. A D. B
*
* 3. 以下选项中哪一题的答案与其它三项不同:
@michaelHL
michaelHL / cloudSettings
Last active October 27, 2018 00:54
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-10-27T00:54:27.927Z","extensionVersion":"v3.2.0"}
@michaelHL
michaelHL / WordStringToTitle.vba
Last active April 14, 2020 13:53
word首字母大写
Sub captical()
Selection.WholeStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.SmallCaps = False
.AllCaps = True
End With
With Selection.Find
.Text = "<([A-Za-z])"
@michaelHL
michaelHL / gist:b39606ccb15392b1c3754e5f81c9a76e
Created November 29, 2017 15:31 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@michaelHL
michaelHL / web-servers.md
Created November 21, 2017 08:22 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@michaelHL
michaelHL / ssh.md
Last active November 1, 2017 07:53
利用 ssh 穿透

利用 ssh 穿透内网

记号

代号 位置 地址 账户
A 位于公网 a.site usera
B 位于 NAT 之后 localhost userb
C 位于 NAT 之后 localhost userc