month of March 2017

pull/10/head
gotbletu 7 years ago
parent 8b204530b3
commit 08739346f5

@ -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

@ -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

@ -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
Loading…
Cancel
Save