Skip to content

Instantly share code, notes, and snippets.

@jonbakerfish
jonbakerfish / my.pac
Last active July 21, 2023 15:12
my pac
var proxy = 'SOCKS5 127.0.0.1:1088; DIRECT;';
var rules = [
[
[],
[]
],
[
[
"onedrive.com",
"onedrive.live.com",
@jonbakerfish
jonbakerfish / zshrc
Last active July 11, 2023 06:43
zshrc
setopt rm_star_silent
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@jonbakerfish
jonbakerfish / .tmux.conf
Last active July 12, 2023 06:13
Tmux Conf
set-option -g default-shell /bin/zsh
set -g base-index 1
set -g prefix C-b
set-option -g history-limit 5000
set-window-option -g mode-keys vi
set -g display-panes-time 8000 #8s
set -g default-terminal "screen-256color"
bind r source-file ~/.tmux.conf
bind '"' split-window -c "#{pane_current_path}"
@jonbakerfish
jonbakerfish / nvidia_node.sh
Last active August 27, 2017 09:32
nvidia_node.sh
#!/bin/bash
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then
# Count the number of NVIDIA controllers found.
NVDEVS=`lspci | grep -i NVIDIA`
N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l`
N=`expr $N3D + $NVGA - 1`
for i in `seq 0 $N`; do
mknod -m 666 /dev/nvidia$i c 195 $i
@jonbakerfish
jonbakerfish / loop_aria2.sh
Last active August 14, 2024 20:08
aria2 downloads a list of files, loop until all file are finished
#!/bin/bash
aria2c -j5 -i list.txt -c --save-session out.txt
has_error=`wc -l < out.txt`
while [ $has_error -gt 0 ]
do
echo "still has $has_error errors, rerun aria2 to download ..."
aria2c -j5 -i list.txt -c --save-session out.txt
has_error=`wc -l < out.txt`
sleep 10
@jonbakerfish
jonbakerfish / notepad++.reg
Created December 12, 2015 05:21
Add "Open With Notepad++" to context menu on Windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Open With Notepad++\command]
@="C:\\Program usb\\npp.6.6.8.bin\\notepad++.exe %1"