Skip to content

Instantly share code, notes, and snippets.

View peng051410's full-sized avatar
🎯
Focusing

tomyli peng051410

🎯
Focusing
View GitHub Profile
@peng051410
peng051410 / get_title_and_url.applescript
Created September 16, 2022 06:09 — forked from dongyuwei/get_title_and_url.applescript
Applescript to get frontmost tab’s url and title of various browsers.
# Keep in mind that when asking for a `return` after another, only the first one will be output.
# This example is meant as a simple starting point, to show how to get the information in the simplest available way.
# Google Chrome
tell application "Google Chrome" to return URL of active tab of front window
tell application "Google Chrome" to return title of active tab of front window
# Google Chrome Canary
tell application "Google Chrome Canary" to return URL of active tab of front window
tell application "Google Chrome Canary" to return title of active tab of front window
# Chromium
@peng051410
peng051410 / Readme.md
Created February 11, 2022 03:30 — forked from carakan/Readme.md
How to install GNU Global with universall ctags support on mac OS

Unfortunately, homebrew does not support --with-universal-ctags option for global (on the state of April 2018) The reason is that universal-ctags is not officially released yet.

Install universal ctags

Run brew install --HEAD universal-ctags/universal-ctags/universal-ctags (See https://github.com/universal-ctags/homebrew-universal-ctags repo)

If you're on macOS, you might have an old ctags installed with command line tools for XCode. To fix this, simply run alias ctags="`brew --prefix`/bin/ctags"

@peng051410
peng051410 / ffmpeg.md
Created May 21, 2021 02:25 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@peng051410
peng051410 / org-ref-skim.el
Created January 13, 2021 11:24 — forked from fuxialexander/org-ref-skim.el
Integration between Org-ref and Skim.app [Skim Annotation <-> Org Bidirectional Jump]
(setq org-capture-templates (quote (("SA" "Skim Annotation" entry
(file+function org-ref-bibliography-notes my-org-move-point-to-capture-skim-annotation)
"* %^{Logging for...} :skim_annotation:read:literature:
:PROPERTIES:
:Created: %U
:CITE: cite:%(my-as-get-skim-bibtex-key)
:SKIM_NOTE: %(my-org-mac-skim-get-page)
:SKIM_PAGE: %(my-as-get-skim-page)
:END:
%i
@peng051410
peng051410 / org-ref-skim.el
Created January 13, 2021 11:24 — forked from fuxialexander/org-ref-skim.el
Integration between Org-ref and Skim.app [Skim Annotation <-> Org Bidirectional Jump]
(setq org-capture-templates (quote (("SA" "Skim Annotation" entry
(file+function org-ref-bibliography-notes my-org-move-point-to-capture-skim-annotation)
"* %^{Logging for...} :skim_annotation:read:literature:
:PROPERTIES:
:Created: %U
:CITE: cite:%(my-as-get-skim-bibtex-key)
:SKIM_NOTE: %(my-org-mac-skim-get-page)
:SKIM_PAGE: %(my-as-get-skim-page)
:END:
%i
@peng051410
peng051410 / cloudSettings
Created December 6, 2020 07:18 — forked from Imymirror/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-11-15T18:58:26.559Z","extensionVersion":"v3.4.3"}
@peng051410
peng051410 / gccemacs.md
Created November 12, 2020 13:44 — forked from AllenDang/gccemacs.md
Build gccemacs on MacOS catalina with gcc 10 installed by homebrew.
@peng051410
peng051410 / OpenVivaldiTabsBySafari.txt
Created November 2, 2019 07:14
OpenVivaldiTabsBySafari
set list_Tabs to {}
tell application "Vivaldi"
set the_Tabs to (tabs of every window)
repeat with the_Tab in the_Tabs
set the_Items to (every item of the_Tab)
repeat with the_Item in the_Items
copy URL of the_Item to end of list_Tabs
end repeat
end repeat
end tell
@peng051410
peng051410 / gist:013856125a90fbff16b2efa4d3fddd35
Created January 21, 2019 03:30
v: get browser current tab url
tell application "Vivaldi"
get URL of active tab of first window
end tell
@peng051410
peng051410 / gist:8ea010542f4be0595754504492c3d220
Created November 15, 2018 09:22 — forked from mayoff/gist:1138816
AppleScript to make Google Chrome open/reload a URL
(* To the extent possible under law, Rob Mayoff has waived all copyright and related or neighboring rights to “AppleScript to make Google Chrome open/reload a URL”. This work is published from: United States. https://creativecommons.org/publicdomain/zero/1.0/ *)
tell application "Google Chrome"
activate
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
if (count every window) = 0 then
make new window
end if
set found to false