Skip to content

Instantly share code, notes, and snippets.

Avatar

Remik P4z

View GitHub Profile
@P4z
P4z / sysctl.conf
Created Aug 20, 2019 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
View sysctl.conf
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@P4z
P4z / zte.reroute-syslog.sh
Created Aug 15, 2019
My solution to prevent sending syslog messages to untrusted remote host for ZTE's 4G modems.
View zte.reroute-syslog.sh
#!/bin/sh
/bin/netstat -rn | grep ^195.54.122.206 > /dev/null
if [[ $? -eq 1 ]] ; then /bin/iproute add 195.54.122.206/32 dev usb0; fi
@P4z
P4z / keybase.md
Created Jun 2, 2018
Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am P4z on github.
  • I am p4 (https://keybase.io/p4) on keybase.
  • I have a public key whose fingerprint is 939C 7C85 E24C 5B59 8A23 16D8 4544 9157 DE55 5D8E

To claim this, I am signing this object:

View menu.js
define(function() {
var needLogin = false;
var menu = [
// level 1 menu
{
hash:'#login',
path:'login',
level:'1',
requireLogin:false,
checkSIMStatus:false
@P4z
P4z / motd.tcl
Created Apr 22, 2016
/etc/motd.tcl
View motd.tcl
#!/usr/bin/env tclsh
# MOTD script original? / mod mewbies.com / mod P4
# http://www.mewbies.com/how_to_customize_your_console_login_message_tutorial.htm
# * Variables
set var(user) $env(USER)
set var(path) $env(PWD)
set var(home) $env(HOME)
# * Calculate current system uptime
@P4z
P4z / fish_greeting.fish
Last active Jan 12, 2018
/etc/fish/fish_greeting
View fish_greeting.fish
function fish_greeting
#/usr/games/fortune -s | /usr/games/cowsay -nfhead-in | /usr/games/lolcat
if test -x /etc/motd.tcl
/etc/motd.tcl
end
#/usr/bin/cal -B1 -A1 #| /usr/games/lolcat -ap .333 -d 2
end
@P4z
P4z / fish_prompt.fish
Created Apr 22, 2016
/etc/fish/fish_prompt
View fish_prompt.fish
function fish_prompt
#and set retc green; or set retc red
set lastexit $status
if test $lastexit = 0
set retc green
else
set retc red
end
tty|grep -q tty; and set tty tty; or set tty pts
set_color $retc
You can’t perform that action at this time.