Skip to content

Instantly share code, notes, and snippets.

@in-in
in-in / imageresize.sh
Last active February 19, 2018 14:25
resize images two and three times
#! /bin/bash
# prerequisites: libvips http://www.vips.ecs.soton.ac.uk
# http://www.vips.ecs.soton.ac.uk/supported/current/doc/html/libvips/libvips-resample.html#vips-resize
# filename should looks like: `filename.jpg`
cwd=$(pwd)
# re='_([0-9]{2,4})\.(jpg|png)'
re='\.(jpg|jpeg|png)'
@in-in
in-in / .vimrc
Last active June 6, 2019 17:49
vimrc
syntax on
set number
set listchars=eol:¬,tab:>·,trail:~,space:␣
set list
se mouse+=a
set directory^=$HOME/.vim/tmp//
set autoindent
set noexpandtab
set tabstop=4
set shiftwidth=4
#! /bin/bash
# veracrypt_mount.sh
# how to run
# chmod u+x veracrypt_mount.sh && sudo ./veracrypt_mount.sh
USER_HOME=$(eval echo ~"${SUDO_USER}")
VOLUME_NAME='storage'
VOLUME_PATH='/dev/sda3'