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
ubuntu ALL=(root) NOPASSWD: ALL |
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
wget -q -O - https://foo/bar.sh | bash |
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
echo %E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%82%8F | tr = % | nkf -WwmQ |
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
# Create Screen with window title | |
screen -S ${screen_name} -t ${window_title} | |
# Send text to input buffer with window title | |
screen -S ${screen_name} -p ${window_title} -X stuff $'echo hello\r' | |
# Send Ctrl c to window | |
screen -S ${screen_name} -p ${window_title} -X stuff $'\003' | |
# Send up to window |
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
sudo update-rc.d <service name> defaults |
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
echo `readlink -f "${0}"` |
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
import openpyxl | |
wb = openpyxl.Workbook() | |
wb.save(filename='/tmp/foo.xlsx') |
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
description "description of service" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
pre-start script | |
mkdir -p /var/run/${SERVICE_NAME} | |
end script | |
post-stop script |
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
# install wordpress and requirements | |
sudo apg-get install wordpress mysql-server apache2 php5 libapache2-mod-php5 | |
# set wordpress folder to www root | |
# * in other way, setting wordpress folder to DocumentRoot in /etc/apache2/sites-enabled/000-default, it is the same effect as above commands. | |
sudo rm -fr /var/www | |
sudo ln -s /usr/share/wordpress /var/www | |
sudo chown www-data:www-data /usr/share/wordpress/ -R | |
# configuration wordpress and mysql |
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
awk 'NR>1 {print $1}' file |