From 08739346f5cd60467facf8c2935360a7909d66cb Mon Sep 17 00:00:00 2001 From: gotbletu Date: Wed, 1 Mar 2017 15:11:28 -0800 Subject: [PATCH] month of March 2017 --- newsbeuter_bookmarks_surfraw.md | 75 ++++++++++++++++++++++++++++++++ newsbeuter_bookmarks_surfraw.sh | 29 +++++++++++++ zsh_global_alias_expansion.md | 76 +++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 newsbeuter_bookmarks_surfraw.md create mode 100755 newsbeuter_bookmarks_surfraw.sh create mode 100644 zsh_global_alias_expansion.md diff --git a/newsbeuter_bookmarks_surfraw.md b/newsbeuter_bookmarks_surfraw.md new file mode 100644 index 0000000..ddcdc43 --- /dev/null +++ b/newsbeuter_bookmarks_surfraw.md @@ -0,0 +1,75 @@ +# Newsbeuter save Bookmarks to Surfraw +* tutorial video: [Link](https://www.youtube.com/watch?v=rHVfgGTTtNQ) +* offical website: [Link](https://www.youtube.com/user/gotbletu) + +### install requirements + newsbeuter surfraw + +### configuration + vim ~/.newsbeuter/config + + # references: https://newsbeuter.wordpress.com/2007/08/27/bookmarking/ + bookmark-cmd "~/.scripts/newsbeuter_bookmarks_surfraw.sh" + +### script + +- You can wget the script here: [newsbeuter_bookmarks_surfraw.sh](newsbeuter_bookmarks_surfraw.sh) +- or manually save below + + + #!/bin/sh + # _ _ _ _ + # __ _ ___ | |_| |__ | | ___| |_ _ _ + # / _` |/ _ \| __| '_ \| |/ _ \ __| | | | + #| (_| | (_) | |_| |_) | | __/ |_| |_| | + # \__, |\___/ \__|_.__/|_|\___|\__|\__,_| + # |___/ + # https://www.youtube.com/user/gotbletu + # https://twitter.com/gotbletu + # https://plus.google.com/+gotbletu + # https://github.com/gotbletu + # gotbleu@gmail.com + + # info: newsbeuter script to save bookmarks directly to surfraw + # demo video: https://www.youtube.com/watch?v=rHVfgGTTtNQ + # references: https://newsbeuter.wordpress.com/2007/08/27/bookmarking/ + # config: + # vim ~/.newsbeuter/config + # bookmark-cmd "~/.scripts/newsbeuter_bookmarks_surfraw.sh" + # hotkey: + # Ctrl+B to bookmark an article url + # Ctrl+G to cancel + + + url="$1" # url + title="$2" # tags + description="$3" # nickname (single word only, no spaces) + echo -e "${description}\t${url}\t;; newsbeuter ${title}" >> ~/.config/surfraw/bookmarks + +### launch bookmarks (fzf + surfraw) +Note: This was not cover in the video since it was already explained in this old video below + +https://www.youtube.com/watch?v=Dmbh4r2mmDs + +### references +- https://www.youtube.com/watch?v=rHVfgGTTtNQ +- fzf bookmark launcher: https://www.youtube.com/watch?v=Dmbh4r2mmDs&list=PLqv94xWU9zZ2fMsMMDF4PjtNHCeBFbggD&index=3 +- https://newsbeuter.wordpress.com/2007/08/27/bookmarking/ +- Newsbeuter playlist: https://www.youtube.com/playlist?list=PLqv94xWU9zZ30jHFe8pqC5qES6ya6v2sE + +### contact + + _ _ _ _ + __ _ ___ | |_| |__ | | ___| |_ _ _ + / _` |/ _ \| __| '_ \| |/ _ \ __| | | | + | (_| | (_) | |_| |_) | | __/ |_| |_| | + \__, |\___/ \__|_.__/|_|\___|\__|\__,_| + |___/ + +- http://www.youtube.com/user/gotbletu +- https://twitter.com/gotbletu +- https://plus.google.com/+gotbletu +- https://github.com/gotbletu +- gotbletu@gmail.com + + diff --git a/newsbeuter_bookmarks_surfraw.sh b/newsbeuter_bookmarks_surfraw.sh new file mode 100755 index 0000000..ae75e74 --- /dev/null +++ b/newsbeuter_bookmarks_surfraw.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# _ _ _ _ +# __ _ ___ | |_| |__ | | ___| |_ _ _ +# / _` |/ _ \| __| '_ \| |/ _ \ __| | | | +#| (_| | (_) | |_| |_) | | __/ |_| |_| | +# \__, |\___/ \__|_.__/|_|\___|\__|\__,_| +# |___/ +# https://www.youtube.com/user/gotbletu +# https://twitter.com/gotbletu +# https://plus.google.com/+gotbletu +# https://github.com/gotbletu +# gotbleu@gmail.com + +# info: newsbeuter script to save bookmarks directly to surfraw +# demo video: https://www.youtube.com/watch?v=rHVfgGTTtNQ +# references: https://newsbeuter.wordpress.com/2007/08/27/bookmarking/ +# config: +# vim ~/.newsbeuter/config +# bookmark-cmd "~/.scripts/newsbeuter_bookmarks_surfraw.sh" +# hotkey: +# Ctrl+B to bookmark an article url +# Ctrl+G to cancel + + +url="$1" # url +title="$2" # tags +description="$3" # nickname (single word only, no spaces) +echo -e "${description}\t${url}\t;; newsbeuter ${title}" >> ~/.config/surfraw/bookmarks + diff --git a/zsh_global_alias_expansion.md b/zsh_global_alias_expansion.md new file mode 100644 index 0000000..5971c11 --- /dev/null +++ b/zsh_global_alias_expansion.md @@ -0,0 +1,76 @@ +# ZSH Global Alias Expansion +Allows you to expand your global alias code in the terminal + +* tutorial video: [Link](https://www.youtube.com/watch?v=WTTIGjZAMGg) +* offical website: [Link](https://www.youtube.com/user/gotbletu) + +### install requirements + zsh + +### configuration + vim ~/.zshrc + + #-------- Global Alias {{{ + #------------------------------------------------------ + # Automatically Expanding Global Aliases (Space key to expand) + # references: http://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html + globalias() { + if [[ $LBUFFER =~ '[A-Z0-9]+$' ]]; then + zle _expand_alias + zle expand-word + fi + zle self-insert + } + zle -N globalias + bindkey " " globalias # space key to expand globalalias + # bindkey "^ " magic-space # control-space to bypass completion + bindkey "^[[Z" magic-space # shift-tab to bypass completion + bindkey -M isearch " " magic-space # normal space during searches + + + # http://www.zzapper.co.uk/zshtips.html + alias -g ND='*(/om[1])' # newest directory + alias -g NF='*(.om[1])' # newest file + #alias -g NE='2>|/dev/null' + alias -g NO='&>|/dev/null' + alias -g P='2>&1 | $PAGER' + alias -g VV='| vim -R -' + alias -g L='| less' + alias -g M='| most' + alias -g C='| wc -l' + alias -g H='| head' + alias -g T='| tail' + alias -g G='| grep' + alias -g LL="2>&1 | less" + alias -g CA="2>&1 | cat -A" + alias -g NE="2> /dev/null" + alias -g NUL="> /dev/null 2>&1" + + #}}} + + +### reload zsh + + source ~/.zshrc + +### references +- https://www.youtube.com/watch?v=WTTIGjZAMGg +- http://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html +- http://www.zzapper.co.uk/zshtips.html + +### contact + + _ _ _ _ + __ _ ___ | |_| |__ | | ___| |_ _ _ + / _` |/ _ \| __| '_ \| |/ _ \ __| | | | + | (_| | (_) | |_| |_) | | __/ |_| |_| | + \__, |\___/ \__|_.__/|_|\___|\__|\__,_| + |___/ + +- http://www.youtube.com/user/gotbletu +- https://twitter.com/gotbletu +- https://plus.google.com/+gotbletu +- https://github.com/gotbletu +- gotbletu@gmail.com + +