Skip to content

Instantly share code, notes, and snippets.

@Agyar
Agyar / .tmux.conf
Last active March 15, 2020 21:04
Neovim config
set-option -g allow-rename off
bind-key -n M-K new-window -c "#{pane_current_path}"
bind-key -n M-H prev
bind-key -n M-J resize-pane -Z
bind-key -n M-L next
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-h select-pane -L
@Agyar
Agyar / battery_level.py
Last active February 21, 2018 18:29
py3status Toggle <3
# -*- coding: utf-8 -*-
"""
Display battery information.
Configuration parameters:
battery_id: id of the battery to be displayed
set to 'all' for combined display of all batteries
(default 0)
blocks: a string, where each character represents battery level
especially useful when using icon fonts (e.g. FontAwesome)
@Agyar
Agyar / c.snippets
Last active December 23, 2015 09:09
C/C++ snippets for Ultisnip vim plugin
snippet ifc "#if #endif" !b
#if ${1:0}
${VISUAL}${0:${VISUAL/(.*)/(?1::code)/}}
#endif
endsnippet
snippet ts "struct"
typedef struct
{
${0:/* data */}
@Agyar
Agyar / Aliases
Created September 18, 2013 17:20
Aliases
alias less='less -R'
alias rgrep='rgrep -n --colour=always'
alias cgrep='grep --colour=always'
alias wgrep='rgrep --exclude=*.o --exclude=*.swp --exclude=*.in --exclude=.*~ --exclude-dir='.svn' -m 1'
alias glog="git log --stat --pretty=oneline --graph --date=short"
@Agyar
Agyar / Manga Reader Downloader
Created September 18, 2013 12:06
Download all the content of a specific manga from manga reader.
#!/bin/zsh
# ./mangareader <manga_url>
website_url="www.mangareader.net"
chapters_dl_name="chdl_name`date +"%H%m%s"`"
tmp_filename="tmp`date +"%H%m%s"`"
# Download the manga index web page
wget $1 -q -O $chapters_dl_name