Extracted from .ipa files or App Store. Just for those who want it.
This file contains hidden or 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
-- Can change this to your favorite new tab page extension URL, such as "chrome-extension://laookkfknpbbblfpciffpaejjkokdgca/dashboard.html" | |
set newTabPage to "chrome://new-tab-page/" | |
tell application "/Applications/Arc.app" | |
activate | |
-- tell front window to make new tab at after (get active tab) with properties {URL:"chrome://new-tab-page/"} -- not working | |
open location newTabPage | |
repeat | |
set windowTitle to "" |
This file contains hidden or 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
-- Can change this to your favorite new tab page extension URL, such as "chrome-extension://laookkfknpbbblfpciffpaejjkokdgca/dashboard.html" | |
set newTabPage to "chrome://new-tab-page/" | |
tell application "/Applications/Arc.app" | |
activate | |
-- tell front window to make new tab at after (get active tab) with properties {URL:"chrome://new-tab-page/"} -- not working | |
open location newTabPage | |
repeat | |
set windowTitle to "" |
Apple Shortcut for creating a long-term (per day) stock chart that can be used as a widget with Charty.
- iOS or macOS
- Charty
This file contains hidden or 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
brew install openjdk && echo 'export PATH="$(brew --prefix openjdk)/bin:$PATH"' >> ~/.zshrc |
This file contains hidden or 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
if application "Spotify" is running then | |
using terms from application "Spotify" | |
if player state of application "Spotify" is paused then | |
tell application "Spotify" to play | |
else | |
tell application "Spotify" to pause | |
end if | |
end using terms from | |
else | |
using terms from application "Music" |
This file contains hidden or 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. Sign in to Firstrade's positions page (https://invest.firstrade.com/cgi-bin/main#/cgi-bin/acctpositions). | |
* 2. Open DevTools (Command + Option + i) JS console (Esc), paste the code below. Then stuff will be copied. | |
* 3. Open a new text file, paste the copied content into it and save it as *.csv. | |
* 4. Go to the Portfolios page on Yahoo Finance (https://finance.yahoo.com/portfolios), click "Import" and upload the file created on step 3. | |
* 5. You now have a new portfolio imported from your Firstrade positions data (you might want to rename it). | |
*/ | |
function getPositionTable() { |
This file contains hidden or 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
async function lookup(word, dictionaryCode = 'american-english', accessKey = window.ACCESS_KEY) { | |
const response = await fetch( | |
`https://dictionary.cambridge.org/api/v1/dictionaries/${dictionaryCode}/search/first/?q=${word}&format=xml`, | |
{ | |
method: 'GET', | |
headers: { accessKey }, | |
} | |
); | |
const json = await response.json(); | |
const parser = new DOMParser(); |
This file contains hidden or 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
function delay(ms = 1000) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, ms); | |
}); | |
} | |
function getCourseIdFromPath() { | |
try { | |
const [, id] = window.location.hash.match(/course-wizard\/edit\/([^/]+)/); | |
return id; |