Skip to content

Instantly share code, notes, and snippets.

@oguzdev35
oguzdev35 / rpi3-human_readable_usb.rules.sh
Created January 4, 2023 13:49 — forked from gordio/rpi3-human_readable_usb.rules.sh
Use static names for USB devices for Raspberry Pi 3. (ttyUSBUpperLeft, ttyUSBLowerLeft, ttyUSBUpperRight, ttyUSBLowerLeft)
cat > "/etc/udev/rules.d/99-human_readable_usb.rules" << EOF_USB_RULES
SUBSYSTEM=="tty", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.2:1.0", SYMLINK+="ttyUSBUpperLeft"
SUBSYSTEM=="tty", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.3:1.0", SYMLINK+="ttyUSBLowerLeft"
SUBSYSTEM=="tty", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.4:1.0", SYMLINK+="ttyUSBUpperRight"
SUBSYSTEM=="tty", ENV{ID_PATH}=="platform-3f980000.usb-usb-0:1.5:1.0", SYMLINK+="ttyUSBLowerLeft"
EOF_USB_RULES
udevadm control --reload-rules
@oguzdev35
oguzdev35 / ddos.txt
Created October 14, 2022 05:38 — forked from bom-d-van/ddos.txt
Detecting and Mitigating DDOS Attacks
Detecting and Mitigating DDOS Attacks
#List all Finish (FIN) packets
machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 1 != 0'
#List all SYN and SYN-ACK packets
machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 2 != 0'
@oguzdev35
oguzdev35 / gist:e75808673ebb62f18e2231ca23fe5b2e
Created October 27, 2021 19:41 — forked from bansalayush/gist:fa6f28235438592d713ce600fe49c305
Install and debug react-native init app without USB!!!!!
1) Connect your mobile device via usb (just this once)
2) Establish a port with your mobile device using 'adb tcpip <port number>'.
eg. adb tcpip 5555
3) Remove USB and 'adb connect <mobile device ip><above mentioned port number>' .
Eg . adb connect 192.160.0.124:5555
4) 'React-native run-android' in your project folder
@oguzdev35
oguzdev35 / network-tweak.md
Created September 30, 2021 23:06 — forked from mustafaturan/network-tweak.md
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'