start new:
tmux
start new with session name:
tmux new -s myname
| {"browser":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36","version":"0.0.4","createDate":1705459571536,"bookmarks":[{"children":[],"title":"MobileFolder"}]} |
| call pathogen#infect() | |
| "" Remap leader | |
| let mapleader = "," | |
| "" Remat jj to esc | |
| inoremap jj <ESC> | |
| "" Use Vim settings, rather then Vi settings (much better!). | |
| "" This must be first, because it changes other options as a side effect. |
| import Foundation | |
| import WebKit | |
| final class WebCacheCleaner { | |
| class func clean() { | |
| HTTPCookieStorage.shared.removeCookies(since: Date.distantPast) | |
| print("[WebCacheCleaner] All cookies deleted") | |
| WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in |
| extension CGImage { | |
| var isDark: Bool { | |
| get { | |
| guard let imageData = self.dataProvider?.data else { return false } | |
| guard let ptr = CFDataGetBytePtr(imageData) else { return false } | |
| let length = CFDataGetLength(imageData) | |
| let threshold = Int(Double(self.width * self.height) * 0.45) | |
| var darkPixels = 0 | |
| for i in stride(from: 0, to: length, by: 4) { | |
| let r = ptr[i] |
| #!/usr/bin/env bash | |
| rm -rf "${HOME}/Library/Caches/CocoaPods" | |
| rm -rf "`pwd`/Pods/" | |
| pod update |
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| location / { | |
| if ($request_method = 'OPTIONS' ) { | |
| add_header "Access-Control-Allow-Origin" *; | |
| add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD"; | |
| add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept"; | |
| return 200; | |
| } | |
| } |
| media_page = f"https://www.imdb.com/title/{imdb_id}/mediaindex?ref_=tt_ov_mi_sm" | |
| bs = bs4.BeautifulSoup(requests.get(self.media_page).content.decode(), features='lxml') | |
| image_tags = bs.find_all("img", height='100', width='100') | |
| img_srcs = [re.sub(r"(@|_V1)[A-Z\._\d,]+\.jpg", "@._V1_.jpg", t['src']) for t in image_tags] |
| def random_user_agent(): | |
| _USER_AGENT_TPL = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36' | |
| _CHROME_VERSIONS = ( | |
| '74.0.3729.129', | |
| '76.0.3780.3', | |
| '76.0.3780.2', | |
| '74.0.3729.128', | |
| '76.0.3780.1', | |
| '76.0.3780.0', | |
| '75.0.3770.15', |