AWS Snippets
This file contains 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
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
This file contains 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 | |
# Log all output to a file | |
exec > >(tee -ia "$0.log") 2>&1 | |
echo "This will be logged." |
This file contains 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 | |
set -e | |
set -u | |
apt-get update | |
apt-get install \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual \ |
This file contains 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 | |
openssl s_client -connect 127.0.0.1:443 -ssl3 |
This file contains 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 | |
find $1 -type f -print0 | \ | |
xargs -0 md5sum | \ | |
awk '{r = gensub( "([a-f0-9]+) (.+/)(.+)(\\..+)", "\\2\\3\\4 \\2\\1\\4", "g") ; print r ; }' | \ | |
xargs -L1 mv -v |
This file contains 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 | |
echo net.ipv6.conf.all.disable_ipv6 = 1 | sudo tee /etc/sysctl.d/99-disable-ipv6.conf | |
sudo sysctl --system |
This file contains 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 | |
xfconf-query -c xfce4-session -p /shutdown/ShowSuspend --create --set true --type bool | |
xfconf-query -c xfce4-session -p /shutdown/ShowHibernate --create --set false --type bool |
This file contains 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 | |
if [ "$EUID" -ne "0" ] | |
then | |
echo "This script must be run as root." | |
exit 1 | |
fi | |
echo EHC1 > /proc/acpi/wakeup | |
echo EHC2 > /proc/acpi/wakeup |
This file contains 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
-Djava.io.tmpdir=/home/user/temp |
NewerOlder