Skip to content

Instantly share code, notes, and snippets.

View chazdky's full-sized avatar

Chaz Davis chazdky

View GitHub Profile
@antiops
antiops / pixieset-scrape.js
Created November 1, 2020 04:16
pixieset.com dumper
/* pixieset.com full size image scraper
*
* Rips all images in highest quality
*
* To use scroll to the very bottom of the album and press F12 then paste the below snippet in and press enter.
* The full file list will be copied to your clipboard afterwards. You can use jdownloader to easily download the full list.
*/
(() => {
const data = document.querySelectorAll('.masonry-brick img')
@nichtsfrei
nichtsfrei / setup_pi4_manjaro_usb_gadget.sh
Last active October 24, 2022 13:29
sets up manjaro raspberry pi 4 as a usb_gadget
#!/bin/sh
# shamelessly stolen from https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/
# main difference is that I use ip to set the device and don't use dnsmasq.
# Instead I setup 'Raspberry PI4 USB Device' within iPad (or whatever you use) manual to
# 10.55.0.2 255.255.255.248
# so that I don't have to deal with dnsmasq at all.
# I also use modprobe in the initialization script so that I don't load the modules when I don't execute usb-network.sh
echo 'dtoverlay=dwc2' >> /boot/config.txt
@WolfangAukang
WolfangAukang / COLEMAK_README.md
Last active March 30, 2023 17:04
US layout with the Colemak variant swapping Backspace with CapsLock.

Want to use Colemak with Backspace with Capslock on a Wayland system?

Yeah, I have grown frustrated in finding a way to get this running. I need CapsLock in my life.

Here you go, this script will work.

Just make a backup of the previous one (as superuser)

$ cp /usr/share/X11/xkb/symbols/us{,bak}

Vim will not create parent directories if they do not exist on write.

A common method to ensure the path exists is to use an autocmd to check if the parent path exists and if not create it.

function! MkDir(path) abort
  if !isdirectory(a:path)
    call mkdir(a:path, 'p')
 endif
"{ Install plugins
call plug#begin(expand('~/.config/nvim/plugged'))
"*****************************************************************************
" Plug install packages
"*****************************************************************************
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'ryanoasis/vim-devicons'
#!/bin/sh
hosts=""
ssh_options=""
tmux_name="cssh"
usage() {
echo "Usage: $0 [options] host [host ...]" >&2
echo "" >&2
echo "Spawns multiple synchronized SSH sessions inside a tmux session." >&2
@mahyaret
mahyaret / .vimrc
Last active July 4, 2020 12:20
Vim
set hidden
set timeout ttimeoutlen=50
" folding thte code
set foldmethod=indent
set nofoldenable
" za: Toggle code folding.
" zR: Open all folds.
" zM: Close all folds.
@benknoble
benknoble / Vim_autoreply.md
Last active November 23, 2022 17:41 — forked from g0xA52A2A/Vim_autoreply.md
Vim autoreply

A modified version of George's gist which I recommend checking out.

A modified version of Romain's gist which I recomend checking out.

Instead we pull the last line from the command history with ~~~histget()~~~ getcmdline() and use fullcommand() to get the command name. This gives us the proper command name which we can match against literally.

Also rather than always having to return a carriage return and whatever else in an expression I've opted to use an autocmd.

This also fixes what could be considered a minor bug at the time of writting in the original the dlist and ilist mapping. The pattern may have spaces so rather than increment the cursor backwards move it to the start then increment it forwards to the correct destination.

set shell=/usr/bin/bash
if &compatible
set nocompatible
endif
" Declare the general config group for autocommand
if has("autocmd")
augroup vimrc
tmux new-session -d -s backend_proj
tmux send-keys -t backend_proj:0 'cd ~/Projects/project-name;poetry shell' C-m
tmux send-keys -t backend_proj:0 './manage.py runserver' C-m
tmux rename-window 'backend_project'
tmux split-window -h
tmux select-window -t backend_proj:0
tmux send-keys -t backend_proj:0 'cd ~/Projects/another-project-name' C-m
tmux send-keys -t backend_proj:0 'yarn start' C-m
tmux split-window -v -t 0
tmux send-keys -t backend_proj:0 'cd ~/Projects/projectname/foldername;poetry shell' C-m