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/php | |
<?php | |
error_reporting(0); | |
echo "\nRunning php linter...\n"; | |
$params = explode(' ', file_get_contents('php://stdin')); | |
$ref = trim($params[1]); | |
$diff = array(); |
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
<?php | |
try { | |
// configure database access parameters | |
$host = ""; | |
$dbname = ""; | |
$user = ""; | |
$pass = ""; | |
$dbh = new PDO("pgsql:host=$host;dbname=$dbname", $user, $pass); | |
$table_list = get_all_table_list(); |
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
In this homework you will build a small replica set on your own computer. We will check that it works with validate.py, which you should download in week6-lessonfiles.tar or week6-lessonfiles.zip. | |
Create three directories for the three mongod processes. On unix, this could be done as follows: | |
mkdir -p /data/rs1 /data/rs2 /data/rs3 | |
Now start three mongo instances as follows. Note that are three commands. The browser is probably wrapping them visually. | |
./mongod --replSet m101 --logpath "1.log" --dbpath /data/rs1 --port 27017 --smallfiles --fork | |
./mongod --replSet m101 --logpath "2.log" --dbpath /data/rs2 --port 27018 --smallfiles --fork | |
./mongod --replSet m101 --logpath "3.log" --dbpath /data/rs3 --port 27019 --smallfiles --fork |
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/php | |
<?php | |
// Create a stream | |
$opts = array( | |
'http'=>array( | |
'method'=>"GET", | |
'header'=>"Accept-language: en\r\n" . | |
"User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.11\r\n", | |
"Referer: http://translate.google.com/\r\n" |
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
UUID=ad180bc9-3578-4a42-8fc1-54cabd2bffff / ext4 noatime,nodiratime,data=writeback,barrier=0,nobh,discard,errors=remount-ro 0 1 |