Skip to content

Instantly share code, notes, and snippets.

View crazyboycjr's full-sized avatar
🎯
Focusing

Jingrong Chen crazyboycjr

🎯
Focusing
  • Duke University
  • Durham, NC
  • 19:28 (UTC -04:00)
View GitHub Profile
@crazyboycjr
crazyboycjr / auto-connect.service
Last active April 17, 2017 11:34
自动连接寝室电脑并连接ss
[Unit]
Description=Network Auto Connect Tool
DefaultDependencies=no
After=sshd.service NetworkManager.service
[Service]
Type=simple
RestartSec=3
Restart=on-failure
ExecStart=/home/cjr/Developing/autoconnect/auto-connect.sh
@crazyboycjr
crazyboycjr / .sh
Created January 10, 2017 07:57
学校实验室有线命令行联网
# provide by @ihciah
# fill username with any valid studentID
curl 10.108.255.249/cgi-bin/do_login -d 'username=14307130118' -d 'password={TEXT}' -d 'type=1'
#$ ping www.baidu.com
#PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
#64 bytes from 119.75.217.109 (119.75.217.109): icmp_seq=1 ttl=50 time=23.5 ms
#... ...
@crazyboycjr
crazyboycjr / 10-mail.conf
Created April 24, 2017 15:36
postfix & dovecot config
##
## Mailbox locations and namespaces
##
# Location for users' mailboxes. The default is empty, which means that Dovecot
# tries to find the mailboxes automatically. This won't work if the user
# doesn't yet have any mail, so you should explicitly tell Dovecot the full
# location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
@crazyboycjr
crazyboycjr / deck-conf
Last active October 15, 2022 23:06
tinc configuration collection. welcome to peer with me~
Name = deck
Mode = switch
Interface = vpn0
ConnectTo = vps2
ConnectTo = vps1
LocalDiscovery = yes
@crazyboycjr
crazyboycjr / auto.py
Created July 17, 2017 14:04
钉钉自动添加表情脚本
import os
import time
import autopy
from autopy import mouse
basepath = '/home/cjr/Downloads/Telegram Desktop/stickers/shrink22222/'
mouse_path = [(928, 1637), (1197, 1551), (919, 1278), (1408, 1768), (928, 1663)]
def comp(x, y):
@crazyboycjr
crazyboycjr / .tmux.conf
Last active April 16, 2021 18:23
tmux.conf
set -g default-terminal "xterm-256color"
set -g mouse on
set -g history-limit 999999999
set -g repeat-time 200
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
run-shell /usr/share/tmux-resurrect/resurrect.tmux
bind a set-window-option synchronize-panes
set -sg escape-time 0
# copy to X clipboard
@crazyboycjr
crazyboycjr / .vimrc
Last active June 4, 2020 12:27
vimrc
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@crazyboycjr
crazyboycjr / .zshrc
Created February 9, 2018 07:50
zshrc
# Filename: /etc/skel/.zshrc
# Purpose: config file for zsh (z shell)
# Authors: (c) grml-team (grml.org)
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
################################################################################
# Nowadays, grml's zsh setup lives in only *one* zshrc file.
# That is the global one: /etc/zsh/zshrc (from grml-etc-core).
# It is best to leave *this* file untouched and do personal changes to
# your zsh setup via ${HOME}/.zshrc.local which is loaded at the end of
@crazyboycjr
crazyboycjr / configuration.txt
Last active August 7, 2019 05:18
Lossless RoCE Configuration for MLNX-OS Switches and Linux Drivers in DSCP-Based PFC and DSCP-Based ECN
Swtich:
switch-mlnxos [standalone: master] (config) # pool ePool0 direction egress-mc size 4194304 type dynamic
switch-mlnxos [standalone: master] (config) # pool ePool1 direction egress size 16777000 type dynamic
switch-mlnxos [standalone: master] (config) # pool iPool0 direction ingress size 4194304 type dynamic
switch-mlnxos [standalone: master] (config) # pool iPool1 direction ingress size 4194304 type dynamic
switch-mlnxos [standalone: master] (config) # interface ethernet 1/10 qos trust L3
switch-mlnxos [standalone: master] (config) # interface ethernet 1/11 qos trust L3
switch-mlnxos [standalone: master] (config) # interface ethernet 1/12 qos trust L3
switch-mlnxos [standalone: master] (config) # interface ethernet 1/10-1/13 ingress-buffer iPort.pg3 bind switch-priority 3
switch-mlnxos [standalone: master] (config) # interface ethernet 1/10-1/13 ingress-buffer iPort.pg6 bind switch-priority 6
@crazyboycjr
crazyboycjr / rc-local.service
Last active January 26, 2023 05:12
rc.local
[Unit]
Description=/etc/rc.local compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target