Posts

Showing posts from April, 2018

net speed i3

bar{  status_command exec ~/.config/i3/net-speed.sh } ls ls  /sys/class/net to find ifaces= list of interfaces to show speed like eth0,enp8s0,etc  touch ~/.config/i3/net-speed.sh nano ~/.config/i3/net-speed.sh ------------------------------------------------------------------------------------------------------------------------------------- ifaces="wlp0s20u2" last_time=0 last_rx=0 last_tx=0 rate="" readable() {   local bytes=$1   local kib=$(( bytes >> 10 ))   if [ $kib -lt 0 ]; then     echo "? K"   elif [ $kib -gt 1024 ]; then     local mib_int=$(( kib >> 10 ))     local mib_dec=$(( kib % 1024 * 976 / 10000 ))     if [ "$mib_dec" -lt 10 ]; then       mib_dec="0${mib_dec}"     fi     echo "${mib_int}.${mib_dec} M"   else     echo "${kib} K"   fi } update_rate() {   local time=$(date +%s)   local rx=0 tx=0 tmp_rx tmp_tx   for iface in $ifaces; do     read tmp_rx

cve pkg

arch-audit

irc register/login

 /msg NickServ info NickServ: (notice) Information on (account ): /nick anothername /msg NickServ info  Keep trying until you see  NickServ: (notice) anothername is not registered. /msg NickServ register verify mail /msg NickServ VERIFY REGISTER You can now see your registration info: /msg NickServ info to login /msg NickServ identify

pastebin

https://ptpb.pw/ cmd | curl -F c = @- https://ptpb.pw/ dmesg | curl -F c = @- https://ptpb.pw/ dmesg | curl -F c = @- https://ptpb.pw/?u = 1

cool texts sym

https://fsymbols.com/generators/encool/ https://fsymbols.com/emoticons/

bash with parameters

#!/bin/bash echo "the $1 eats a $2 every time there is a $3" echo "bye:-)"   save as eat.sh bash eat.sh dog bone moose  the dog eats a bone every time there is a moose bye:-)   $1/$2/$3 =var in order of supplied parms

disk mount

udisksctl info -b /dev/sda

iptables/firewall

iptables -L -v ping to test rules iptables --policy INPUT ACCEPT iptables --policy OUTPUT ACCEPT iptables --policy FORWARD ACCEPT iptables --policy INPUT DROP iptables --policy OUTPUT DROP iptables --policy FORWARD DROP Accept – Allow the connection. Drop – Drop the connection, act like it never happened. This is best if you don’t want the source to realize your system exists. Reject – Don’t allow the connection, but send back an error. This is best if you don’t want a particular source to connect to your system, but you want them to know that your firewall blocked them. iptables -A INPUT -s 10.10.10.10 -j DROP iptables -A INPUT -s 10.10.10.0/24 -j DROP iptables -A INPUT -s 10.10.10.0/255.255.255.0 -j DROP iptables -A INPUT -p tcp --dport ssh -s 10.10.10.10 -j DROP   iptables -A INPUT -p tcp --dport ssh -j DROP   iptables -A INPUT -p tcp --dport ssh -s 10.10.10.10 -m state --state NEW,ESTABLISHED -j ACCEPT   iptables -A OUTPUT -p tcp --sport 22 -d 10.10

ntp update time

ntpdate -buv ntp.ubuntu.com

datetime syntax i3status

https://linux.die.net/man/3/strftime

node js notebook

https://runkit.com/

orphan pkg

sudo pacman -Rns $(pacman -Qtdq)

phoenix os grub cfg

install phoenix os to linux partition , dont format ext3/4 pattiton it creates /PhoenixOS folder dont install grub from phoenix os it removes useful entries instead create custom entry via linux sudo leafpad   /etc/grub.d/40_custom menuentry   'Android'       --class android   --class icon-android  {      set bootdir=/PhoenixOS      set kernelfile=$bootdir/kernel      linux  $kernelfile       verbose androidboot.hardware=android_x86_64 SRC=$bootdir      initrd $bootdir/initrd.img } sudo update-grub or use  sudo grub-mkconfig -o /boot/grub/grub.cfg

update-grub

grub-mkconfig -o /boot/grub/grub.cfg

dual boot win/linx time fix

   Using regedit , add a DWORD value with hexadecimal value 1 to the registry:  Note:   64-bit variant of Windows need  QWORD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal   CMD   reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f    REG file Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] "RealTimeIsUniversal"=dword:00000001   Alternative fix   timedatectl status timedatectl list-timezones  # ls /usr/share/zoneinfo/ to see available zones && ls into ../zone to see subzones timedatectl set-timezone Zone / SubZone  ln -sf /usr/share/zoneinfo/Zone/SubZone /etc/localtime     src== https://wiki.archlinux.org/index.php/Time        

authy

https://chrome.google.com/webstore/detail/authy/gaedmjdfmmahhbjefcbgaolhhanlaolb

curl man page

https://curl.haxx.se/docs/manpage.html

The global coordination of the DNS Root, IP addressing, and other Internet protocol resources is performed as the Internet Assigned Numbers Authority (IANA) functions.

https://www.iana.org/ https://www.iana.org/domains/root/db

ccleaner

C2YW-IAHG-ZU62-INZQ-WZPC C2YW-2BAM-ADC2-89RV-YZPC C2YW-XFCX-ABIG-GZD4-8ZPC C2YW-XK32-GBVV-N3BH-2ZPC C2YW-JKW5-KK79-XHR2-4ZPC C2YW-QTRT-ZVCG-PQDK-CZPC C2YW-GP33-TPIU-BGM8-AZPC net off 

pkgbuild arch

makepkg -si

wifi driver src

https://github.com/lwfinger

sort arch linux mirror by speed

pacman -S reflector   reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist # reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist # reflector --country 'United States' --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist   src https://wiki.archlinux.org/index.php/Reflector    sudo reflector --verbose --country 'India' -l 5 --sort rate --save /etc/pacman.d/mirrorlist  

anaconda fast mirror downlaod

https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes     https://mirror.tuna.tsinghua.edu.cn/help/anaconda/

i3

start-pulseaudio-x11 ~/.xinitrc