Skip to content

Instantly share code, notes, and snippets.

View Nymphium's full-sized avatar
⚜️
百合

Nymphium Nymphium

⚜️
百合
View GitHub Profile
@Nymphium
Nymphium / vim-configure
Last active August 29, 2015 14:04
vim-configure
./configure --prefix=/usr --with-features=big --enable-luainterp=dynamic --enable-rubyinterp=dynamic --enable-multibyte --disable-darwin --disable-gtktest --disable-netbeans --disable-selinux --disable-sysmouse --disable-xsmp --disable-xsmp-interact --enable-cscope --enable-fail-if-missing --disable-xim --disable-fontset --disable-gnome-check --disable-hangulinput
Section "InputClass"
Identifier "keyboard-layout"
MatchIsKeyboard "yes"
Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection
keycode 9 = space
keycode 10 = 1 exclam Prior
keycode 11 = 2 quotedbl Next
keycode 12 = 3 numbersign F11 NoSymbol
keycode 17 = 8 parenleft bracketleft braceleft
keycode 18 = 9 parenright bracketright braceright
keycode 19 = 0 question F12
keycode 20 = NoSymbol
keycode 21 = NoSymbol
keycode 22 = Insert
# run code
top -bn1 -o %CPU | awk 'NR==11{printf "#[fg=colour226]Max:%s(%2.1f%)>", $11, $9}'
# commandline stdout
#[fg=colour226]Max:Xorg.bin(16.0%)>%
# tmux status line
Max:(0.0%)>
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31270 @ 3.40GHz
stepping : 7
microcode : 0x25
cpu MHz : 1692.562
cache size : 8192 KB
physical id : 0
@Nymphium
Nymphium / tmux_local_install.sh
Last active August 29, 2015 14:09 — forked from ryin/tmux_local_install.sh
newest tmux v1.9a
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION="1.9a"
@Nymphium
Nymphium / vpnclient.service
Last active August 29, 2015 14:10
put this at /usr/lib/systemd/system
[Unit]
Description=SoftEther VPNClient
Wants=network.target
Before=dhcpcd.service
[Service]
Type=oneshot
ExecStart=/etc/vpnclient/vpnclient start
RemainAfterExit=yes
@Nymphium
Nymphium / 90-network.conf
Created November 28, 2014 07:40
put thi at /etc/sysctl.d/ (as the ditectory structure after Arch Linux)
net.ipv4.tcp_tw_recycle=1
fs.file-max = 100000
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_sack=1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.somaxconn=40000
@Nymphium
Nymphium / mkdl.conf
Created January 21, 2015 14:09
run `mkdir /tmp/download && ln -sf /tmp/download $HOME/` when boot
# /usr/lib/tmpfiles.d/mkdl.conf
#
# Type Path Mode UID GID Age Argument
D /tmp/download 0755 beshowjo users
L+ /tmp/download - - - - /home/beshowjo/download
@Nymphium
Nymphium / awesome-wallpaper.lua
Created January 25, 2015 23:25
set each wallpaper to each display at awesome
local wp = {
"wallpaper1.png",
"wallpaper2.png"
}
for i = 1, #wp do
gears.wallpaper.fit(os.getenv("HOME") .. "/.config/awesome/" .. wp[i], i)
end