This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cgcreate -a $USER -s 666 -g swap,memory:chrome | |
cgset -r memory.limit_in_bytes=4G -r memory.soft_limit_in_bytes=3800M -r memory.swappiness=5 chrome | |
cgexec -g memory:chrome /opt/google/chrome/google-chrome |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for IP in $(nmap -n -sL 10.8.9.10-50 | awk '{print $5}' | grep --color=never '^[0-9]'); do | |
echo $IP | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example: increae brightness by 15% | |
# backlight.sh inc 15 | |
CURRENT_BRIGHTNESS=$(cat /sys/class/backlight/intel_backlight/brightness) | |
MAX_BRIGHTNESS=$(cat /sys/class/backlight/intel_backlight/max_brightness) | |
ONE_PERCENT_FACTOR=$(( MAX_BRIGHTNESS / 100 )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pactl list sinks | grep --color=never -E '(^Sink|Name|device.description)' | sed 's/^Sink #//g' | sed -r 's/Name: //g' | sed -r '/[[:digit:]]$/{N;s/\n//}' | sed -r '/_sink$/{N;s/\n//}' | sed 's/\t\tdevice.description = /\t/g' |
OlderNewer