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 | |
# | |
# Show user stats (commits, files modified, insertions, deletions, and total | |
# lines modified) for a repo | |
git_log_opts=( "$@" ) | |
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \ | |
| tr '[A-Z]' '[a-z]' \ | |
| grep -v '^$' \ |
The final solution !!
Since the first version of pthreads, PHP has had the ability to initialize Worker threads for users. Onto those Worker threads are stacked objects of class Stackable for execution concurrently.
The objects stacked onto workers do not have their reference counts changed, pthreads forces the user to maintain the reference counts in userland, for the extremely good reason that this enables the programmer to keep control of memory usage; and so, execute indefinitely.
This is the cause of much heartache for newcomers to pthreads; if you do not maintain references properly you will, definitely, experience segmentation faults.
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
<html> | |
<body> | |
<p>Here are Webber’s points:</p> | |
<ul> | |
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li> | |
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li> | |
<li>Use echo’s multiple parameters instead of string concatenation.</li> | |
<li>Set the maxvalue for your for-loops before and not in the loop.</li> | |
<li>Unset your variables to free memory, especially large arrays.</li> | |
<li>Avoid magic like __get, __set, __autoload</li> |
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
<?php | |
include '../vendor/autoload.php'; | |
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
$classLoader->register(); | |
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
$classLoader->register(); | |
// config | |
$config = new \Doctrine\ORM\Configuration(); |
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 | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |