# Install basic tools (only needed for the first time)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install wget
# Install hammerspoon
brew install --cask hammerspoon
open /Applications/Hammerspoon.app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { helper } from '@ember/component/helper'; | |
export default class extends Component { | |
selectedItems = ['apple', 'orange', 'pear']; | |
isItemSelected = helper(([targetItem]) => { | |
console.log(targetItem); | |
return this.selectedItems.includes(targetItem); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Finviz - Screener to map | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Render a button linking to a maps view of currently viewing stocks from screener page | |
// @author Alan Shum | |
// @match *://elite.finviz.com/screener.ashx* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=finviz.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@ember/component'; | |
export default class extends Component { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 1. Install TamperMonkey | |
* 2. Configure a custom search engine in Chromium-based browser | |
* - https://humanum.arts.cuhk.edu.hk/Lexis/lexi-can/?q=%s | |
* 3. Save this script in TamperMonkey | |
* 4. When you load the page with https://humanum.arts.cuhk.edu.hk/Lexis/lexi-can/?q=機 | |
* 5. The script will loop every second (until 10 sec) to check for the submission form | |
* 6. When the form is ready, it will submit the form with the word `機` | |
* 7. Then you will see the cantonese pronounciation from CUHK | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<keymap version="1" name="Visual Studio Code" parent="Visual Studio"> | |
<action id="$Copy"> | |
<keyboard-shortcut first-keystroke="meta c" /> | |
</action> | |
<action id="$Cut"> | |
<keyboard-shortcut first-keystroke="meta x" /> | |
</action> | |
<action id="$Paste"> | |
<keyboard-shortcut first-keystroke="meta v" /> | |
</action> |