Skip to content

Instantly share code, notes, and snippets.

@ijjvim
ijjvim / pdf_contrast.py
Created April 28, 2023 16:13 — forked from pystardust/pdf_contrast.py
Change contrast of pdf using python
"""
# pdf_contrast.py
Modify contrast of pdf
## Install
```
pip install Pillow pdf2image img2pdf tqdm
```
> Save this file as pdf_contrast.py
@ijjvim
ijjvim / script.txt
Created April 28, 2023 15:39 — forked from vielhuber/script.txt
ImageMagick: Increase pdf scan contrast and sharpening #tools
convert -density 150 input.pdf -brightness-contrast 5x25 -sharpen 0x1 output.pdf
convert -density 300 input.pdf -colorspace gray -normalize -level 50%,51% -sharpen 0x1 output.pdf
convert -density 300 input.pdf -colorspace gray -normalize -level 25%,26% -sharpen 0x1 output.pdf
convert -density 300 input.pdf -colorspace gray -normalize -modulate 150 -sharpen 0x1 output.pdf
convert -density 300 input.pdf -contrast -contrast -contrast -contrast -sharpen 0x1 output.pdf
@ijjvim
ijjvim / restart-ssh.bash
Created July 13, 2022 11:49 — forked from influx6/restart-ssh.bash
Restart SSH on Mac Terminal (High Sierra)
# high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
@ijjvim
ijjvim / tmux-cheats.md
Created July 9, 2022 07:00 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@ijjvim
ijjvim / Makefile
Created July 8, 2022 12:40 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@ijjvim
ijjvim / gist:6b1799d0c3721451bd79fe24d94ad00d
Created July 7, 2022 08:32 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@ijjvim
ijjvim / .vimrc
Created April 6, 2022 07:36 — forked from mendeza/.vimrc
Simple .vimrc or init.vim for nvim (neovim)
" (N)Vim Configuration File
" vim : place in $HOME/.vimrc
" nvim : place in $HOME/.config/nvim/init.vim
" $ ln -s $HOME/.config/nvim/init.vim $HOME/.vimrc
" General settings
" https://learnvimscriptthehardway.stevelosh.com/
" ---------------------------------------------------------------------------
" drop vi support - kept for vim compatibility but not needed for nvim
" Probably not needed with Vim 8+
"set nocompatible