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
### Keybase proof | |
I hereby claim: | |
* I am spekkorice on github. | |
* I am spekko (https://keybase.io/spekko) on keybase. | |
* I have a public key ASC948-AR9Mq8WEP7cQK66fB4ZCx8J50D91VlxLgi8RbtAo | |
To claim this, I am signing this object: |
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
docker pull mysql:5.6.27 | |
docker run -p 3306:3306 --name <my-docker-name> -e MYSQL_ROOT_PASSWORD=password -d mysql:5.6.27 | |
mysql -h 0.0.0.0 -P 3306 -u root -ppassword |
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
function quicksort($seq) { | |
if(!count($seq)) return $seq; | |
$pivot= $seq[0]; | |
$low = $high = array(); | |
$length = count($seq); | |
for($i=1; $i < $length; $i++) { | |
// The index at which you would like to sort | |
$sortIndex = 0; | |
if($seq[$i][$sortIndex] <= $pivot[0]) { | |
$low [] = $seq[$i]; |
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 | |
checkIfMySQLTableExists() { | |
table=$1; | |
if [ $(mysql -N -s -u root -p -e \ | |
"select count(*) from information_schema.tables where \ | |
table_schema='${table}' and table_name='${DB}';") -eq 1 ]; then | |
echo "Table ${table} exists! ..."; | |
else | |
echo "Table ${table} does not exist! ..." |
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 | |
# Function to check if the PHP version is valid | |
checkPHPVersion() { | |
# The current PHP Version of the machine | |
PHPVersion=$(php -v|grep --only-matching --perl-regexp "5\.\\d+\.\\d+"); | |
# Truncate the string abit so we can do a binary comparison | |
currentVersion=${PHPVersion::0-2}; | |
# The version to validate against | |
minimumRequiredVersion=$1; |
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
#!/usr/bin/expect -f | |
# Please remember to make the file executable using: | |
# chmod +x expectSSH.exp | |
# | |
# To run the Script simply use ./expectSSH.sh yourhost.com root password | |
set host [lindex $argv 0] | |
set user [lindex $argv 1] | |
set pass [lindex $argv 2] |