Skip to content

Instantly share code, notes, and snippets.

@prachauthit
prachauthit / .bashrc
Last active October 18, 2019 01:38
startup_project.sh
# Add this to bashrc (may be zshrc) to force run terminal with tmux by default
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
tmux attach -t default || tmux new -s default
fi
@prachauthit
prachauthit / twoscreen.sh
Last active October 8, 2019 00:02
configure the monitors
#!/bin/bash
xrandr --auto --output eDP-1-1 --mode 1920x1080 --rate 60.00 --rotate normal --primary --output DP-1-1-2 --mode 1920x1200 --rate 60.00 --left-of eDP-1-1 --rotate normal
import netaddr
"""
For example,
Please scan every ip on 191.0.0.0/16 range but not 191.0.0.10.
Then:
ipcalc 191.0.0.0/16
Get from the Hostmin as start and Hostmax as end
pipe to file and use sublime to find it and remove the whitelised ip
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Script, Write">
<add name="web_config" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="Unspecified" requireAccess="Write" preCondition="bitness64" />
</handlers>
<security>
<requestFiltering>
<fileExtensions>
<remove fileExtension=".config" />
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Script, Write">
<add name="web_config" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="Unspecified" requireAccess="Write" preCondition="bitness64" />
</handlers>
<security>
<requestFiltering>
<fileExtensions>
<remove fileExtension=".config" />
#!/bin/bash
device=$(xinput | grep SYNA | cut -f 2 | grep -oE [0-9]{2})
echo $device
xinput disable $device
# create or add this to ur ~/.tmux.conf
#set prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -g history-limit 100000
set -g allow-rename off
#https://gist.github.com/AVGP/589604
nasm -f elf32 -o user.o user.nasm
ld -m elf_i386 -o user user.o
objdump -d ./user|grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's/ /\\x/g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g'
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!