Skip to content

Instantly share code, notes, and snippets.

View jeserkin's full-sized avatar

Eugene Serkin jeserkin

View GitHub Profile
Eugene@EUGENE-PC /C/Users/Eugene/Desktop/work (master)
$ git submodule add file:///C/Users/Eugene/Desktop/tmp_git test
fatal: You are on a branch yet to be born
Unable to checkout submodule 'test'
Eugene@EUGENE-PC /C/Users/Eugene/Desktop/work (master)
$ ls -l
total 2
-rw-r--r-- 1 Eugene Administ 23 Dec 16 00:37 LICENSE
-rw-r--r-- 1 Eugene Administ 20 Dec 15 19:12 README
/**
* @param bool $throw
* @throws RuntimeException
* @return bool
*/
private function canSendHeaders( $throw = false )
{
$result = headers_sent( $inFile, $atLine );
if ( $result && $throw )
Main repo: A
Submodule repo: B
~B (master): git commit -m 'Something was done'
~A (master): cd submodule
~A/submodule (master): git pull
~B (master): git push
~A/submodule (master): cd ..
~A (master): git add submodule
sandbox@ubuntu:~$ sudo apt-get install phpmyadmin
[sudo] password for sandbox:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package phpmyadmin
Ubuntu 10.10
sandbox@ubuntu:~$ groups www-data
www-data : www-data
Ubuntu 12.04
sandbox@ubuntu:~$ groups www-data
www-data : www-data
Ubuntu 10.10
#export APACHE_RUN_USER=www-data
#export APACHE_RUN_GROUP=www-data
export APACHE_RUN_USER=sandbox
export APACHE_RUN_GROUP=admin
Ubuntu 12.04
export APACHE_RUN_USER=www-data
Ubuntu 10.10
sandbox@ubuntu:~$ ls -l /var/log/apache2/
total 20972
-rw-r----- 1 root adm 3305413 2013-01-18 01:23 error.log
Ubuntu 12.04
Those that are by default under /var/log/apache2
6
97 39
34 37 656 97
186 75
68 16 539 186
137 49
48 17 461 137
98 59
6 30 524 98
46 18
PHP Warning: Uncaught exception 'Doctrine\ORM\ORMException' with message 'Entity of type "A" has identity through a foreign entity "B", however this entity has no identity itself. You have to call EntityManager#persist() on the related entity and make sure that an identifier was generated before trying to persist "A". In case of Post Insert ID Generation (such as MySQL Auto-Increment or PostgreSQL SERIAL) this means you have to call EntityManager#flush() between both persist operations.' in /vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:50
/* retrieve all rows from myCity */
$query = "SELECT Name, CountryCode, District FROM myCity";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_row()) {
printf("%s (%s,%s)\n", $row[0], $row[1], $row[2]);
}
/* free result set */
$result->close();
}