##pull wnameless/oracle-xe-11g
$ sudo docker pull wnameless/oracle-xe-11g##start the wnameless/oracle-xe-11g
$ sudo docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g##pull wnameless/oracle-xe-11g
$ sudo docker pull wnameless/oracle-xe-11g##start the wnameless/oracle-xe-11g
$ sudo docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g| #!/bin/bash | |
| ## | |
| # MySQL DB dump to Git commit | |
| # | |
| # Dumps the specified mysql database to the given location and commits it and | |
| # the previous database to the Git repository. | |
| # | |
| # It is assumed you have already setup the Git respository to only be the | |
| # a checkout of the database backup location |
| <?php | |
| function getService() | |
| { | |
| // Creates and returns the Analytics service object. | |
| // Load the Google API PHP Client Library. | |
| require_once 'google-api-php-client/src/Google/autoload.php'; | |
| // Create and configure a new client object. |
| SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
| FROM information_schema.processlist | |
| WHERE command <> 'Sleep' | |
| AND info NOT LIKE '%PROCESSLIST%' | |
| ORDER BY time DESC LIMIT 50; |
| ########## | |
| # +----+ # | |
| # | DS | # | |
| # +----+ # | |
| ########## | |
| # set vi mode | |
| set -o vi | |
| # set colors correctly on OS X |
| <?php | |
| $dbname = 'your-database-name'; | |
| mysql_connect('your-database-hostname', 'your-database-username', 'your-database-password'); | |
| mysql_query("ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"); | |
| $result = mysql_query("SHOW TABLES FROM `$dbname`"); | |
| while($row = mysql_fetch_row($result)) { | |
| $query = "ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
| mysql_query($query); | |
| $query = "ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
| mysql_query($query); |