View githelp
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
Quick setup — if you’ve done this kind of thing before | |
or | |
Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore. | |
…or create a new repository on the command line | |
Optional | |
git clone ... | |
end |
View shell_magic_constans
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
# Magic variables: __FILE__, __DIR__, __BASE__, __ROOT__ | |
bashSource="${BASH_SOURCE[0]}" | |
while [ -h "${bashSource}" ]; do | |
if [[ "${bashSource}" == /* ]]; then | |
bashSource="$(readlink "${bashSource}")" | |
else | |
bashSource="$(dirname "${bashSource}")/$(readlink "${bashSource}")" | |
fi | |
done | |
__FILE__="${bashSource}" |
View expect_install_mysql.sh
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 | |
MYSQL_PASSWORD="pass" | |
export MYSQL_PASSWORD="$MYSQL_PASSWORD" | |
# Debug | |
#expect -D 1 -c ' | |
expect -c ' | |
spawn apt-get install -y mysql-server |
View info.pl
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
#!/usr/bin/perl | |
print "Content-type: text/html\n\n"; | |
print "<!DOCTYPE html>\n"; | |
print "<html>\n"; | |
print " <head>\n"; | |
print " <title>Perl</title>\n"; | |
print " </head>\n"; | |
print " <body style=\"backgorund-color: #fff; color: #333; font-family: arial, helvetica, sans-serif;\">\n"; | |
print " <h1>Perl</h1>\n"; | |
print " <p style=\"white-space: pre-wrap;\">\n"; |