Skip to content

Instantly share code, notes, and snippets.

@canabady
canabady / lighttpd-fastcgi-solution.html
Last active May 25, 2022 23:12
Unexpected end of file perhaps the fastcgi process died lighttpd
Issue:
Unexpected end of file perhaps the fastcgi process died lighttpd
Solution:
Check lighttpd cgi config.
For more info refer: https://www.cyberciti.biz/tips/lighttpd-php-fastcgi-configuration.html
@canabady
canabady / duptools-gdrive.sh
Created January 1, 2017 12:06 — forked from vibragiel/duptools-gdrive.sh
An example on how to use duplicity to perform encrypted incremental backups on Google Drive. Changes over tileo's original script: Google Drive instead of S3 as backend storage. Zenity dialogs to ask for credentials. IGNORE variable to exclude a list of directories from the backup. Verbosity raised to level 8. Activated asynchronous uploads.
#!/bin/bash
# directories to be included, space separated
SOURCE="/home/chewie /etc"
# directories to be excluded, space separated
IGNORE="/home/chewie/Downloads /home/chewie/Steam"
DRIVE_FOLDER="duplicity-backup"
LOGFILE=/home/chewie/duplicity.log
# set email to receive a backup report
EMAIL=""
@canabady
canabady / .vimrc
Last active February 6, 2017 06:47
Shortcut for editing and sourcing VIMRC
" Quickly edit/reload VIMRC configuration file
nnoremap gev :e $MYVIMRC<CR>
nnoremap gsv :so $MYVIMRC<CR>
if has ('autocmd') " Remain compatible with earlier versions
augroup vimrc " Source vim configuration upon save
autocmd! BufWritePost $MYVIMRC source % | echom "Reloaded " . $MYVIMRC | redraw
autocmd! BufWritePost $MYGVIMRC if has('gui_running') | so % | echom "Reloaded " . $MYGVIMRC | endif | redraw
augroup END
endif " has autocmd
@canabady
canabady / .vimrc
Last active February 6, 2017 06:49
Setting options for Gist Plugin in VIMRC
" for creating gists
Plugin 'mattn/webapi-vim'
Plugin 'mattn/gist-vim'
""""""""""""""""""""""""""""
" GIST Options
""""""""""""""""""""""""""""
" If you set g:gist_clip_command, gist.vim will copy the gist code with option '-c'
let g:gist_clip_command = 'xclip -selection clipboard'