Skip to content

Instantly share code, notes, and snippets.

Avatar
🤒
Working hard!

Francis Feng francisfeng

🤒
Working hard!
View GitHub Profile
@francisfeng
francisfeng / save-tabs-safari-anybox.applescript
Last active Jun 1, 2022
Save all tabs of Safari’s current window to Anybox
View save-tabs-safari-anybox.applescript
tell application "Safari"
repeat with tabItem in tabs of window 1
set link to URL of tabItem
tell application id "cc.anybox.Anybox"
save link
end tell
end repeat
end tell
@francisfeng
francisfeng / goodlinks.json
Created Jan 15, 2022
A sample of GoodLinks's exported JSON file
View goodlinks.json
@francisfeng
francisfeng / command-c.swift
Last active Jan 12, 2021
Simulating Command + C (aka Copy command) in macOS
View command-c.swift
// 0x08 is key code for "c"
guard let keydownEvent = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: true) else { return }
guard let keyupEvent = CGEvent(keyboardEventSource: nil, virtualKey: 0x08, keyDown: false) else { return }
keydownEvent.flags = CGEventFlags.maskCommand
keydownEvent.post(tap: CGEventTapLocation.cghidEventTap)
keyupEvent.flags = CGEventFlags.maskCommand;
keyupEvent.post(tap: CGEventTapLocation.cghidEventTap)
// For it to work, Accessibility needs to be enabled in
@francisfeng
francisfeng / things-you-should-know-before-accepting-offer.md
Last active Apr 7, 2022
Things You Should Know Before Accepting Offer
View things-you-should-know-before-accepting-offer.md

接受录用函前应该知道的东西

说明

入职后才知道新工作难和心意,劳动者权益被企业侵犯,正当权利无法得到保障。诸如此类事情层出不穷。有时这些事情可在入职前、与用人单位沟通时,通过多问一些问题避免。

编者汇集众多网友之见,编撰要旨一份。此要旨包含「必问问题」、「工作相关」、「生活相关」三个部分。

  1. 「必问问题」关系求职者的自身权益,应该知晓此列表的所有答案。

  2. 「工作相关」旨在帮助求职者了解未来的工作内容,可酌情提问。