This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.
- Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
<$publications> | |
[#<$citeKey/>]: <$authors.name?> | |
<$authors.name.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/><?$authors.name?><$editors.name.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/> (Hrsg.) | |
</$authors.name?> | |
<$fields.Year?> (<$fields.Year/>)</$fields.Year?>: _<$fields.Title.stringByRemovingTeX/><$fields.Subtitle?>. <$fields.Subtitle.stringByRemovingTeX/></$fields.Subtitle?>_<$pubType=article?> | |
, <$fields.Journal/><$fields.Number?> <$fields.Number/></$fields.Number?>, <$fields.Year/>, Vol. <$fields.Volume/>, S. <$fields.Pages/><?$pubType=incollection?> | |
, in: <$fields.Booktitle/><$fields.Address?>, <$fields.Address/>: <$fields.Publisher?><$fields.Publisher/></$fields.Publisher?><?$fields.Address?> | |
<$fields.Publisher?>, <$fields.Publisher/></$fields.Publisher?> | |
</$fields.Address?> | |
<?$pubType?> |
If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need.
Thus, you should keep the .vim
directory along with your .vimrc
version-controlled.
But when you have plugins installed inside .vim/bundle
(if you use pathogen), or inside .vim/pack
(if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.
Initialize a git repository inside your .vim
directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:
cd ~/.vim
""" | |
Convert YouTube subtitles(vtt) to human readable text. | |
Download only subtitles from YouTube with youtube-dl: | |
youtube-dl --skip-download --convert-subs vtt <video_url> | |
Note that default subtitle format provided by YouTube is ass, which is hard | |
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which | |
is easier to process. |
Recently, I started listening to the David Allen's audio book, "Getting Things Done: The Art of Stress-Free Productivity". In only a few chapters, this audio book has inspired me to completely revamp how I "get things done".
While I haven't heard the entire GTD system or even fully grasped everything I've heard, here are a few concepts that have already helped me become more productive at work and helped my family become more productive at home.
TLDR: always put actions, ideas, and reminders in a place that gets them out of your head but always in reach.