Skip to content

Instantly share code, notes, and snippets.

@lornajane
lornajane / mac.md
Last active July 6, 2024 02:26
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@mwerner
mwerner / app_watcher.lua
Created November 1, 2017 20:11
Hammerspoon scripts
function applicationWatcher(appName, eventType, appObject)
if (eventType == hs.application.watcher.activated) then
if (appName == "Finder") then
-- Bring all Finder windows forward when one gets activated
appObject:selectMenuItem({"Window", "Bring All to Front"})
end
end
end
local appWatcher = hs.application.watcher.new(applicationWatcher)
# -*- mode: python -*-
block_cipher = None
icon = '/Applications/Calculator.app/Contents/Resources/AppIcon.icns' # Eventually change me
a = Analysis(['systray.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
@ThatsJustCheesy
ThatsJustCheesy / init.lua
Last active March 11, 2024 17:18
Hammerspoon web browser picker (set Hammerspoon as your default web browser and add this code to your config)
hs.urlevent.httpCallback = function(scheme, host, params, fullURL)
if host == nil then
host = 'file'
end
local success, _, res = hs.osascript.applescript('choose from list {"Safari", "Brave"} with prompt "Open '..host..' with…"');
local app
if success and res:match('Safari') ~= nil then
app = 'com.apple.Safari'
elseif success and res:match('Brave') ~= nil then
app = 'com.brave.Browser'

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@lxfly2000
lxfly2000 / earthquakes-cn-api.md
Last active May 6, 2024 12:26
中国地震台网及速报相关的API

中国地震台网及速报相关的API

中国地震台网网站

全球地震记录
https://www.ceic.ac.cn/ajax/speedsearch?num=6

四川地震局

(疑似)仅限四川境内及周边省份一小部分区域,属于预警
http://118.113.105.29:8002/api/earlywarning/jsonPageList?orderType=1&pageNo=1&pageSize=20&userLat=0.0&userLng=0.0

福建地震局

全球地震记录,不稳定,更新也不及时,前段时间貌似还停更了一个月左右
http://218.5.2.111:9088/earthquakeWarn/bulletin/list.json?pageSize=