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 | |
namespace BenchmarkNosql\Libraries\Storage; | |
use triagens\ArangoDb\Connection; | |
use triagens\ArangoDb\ConnectionOptions; | |
use triagens\ArangoDb\UpdatePolicy; | |
use triagens\ArangoDb\Collection; | |
use triagens\ArangoDb\CollectionHandler; | |
use triagens\ArangoDb\DocumentHandler; |
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
#!/usr/bin/php | |
<?php | |
//Récupération des fichier modifiés par le commit | |
exec('git diff --name-only HEAD | grep -E \'(.php)$\'', $output); | |
$cmds = [ | |
['cmd' => 'php-cs-fixer fix'], | |
['cmd' => 'php -l','return' => 0], | |
]; | |
foreach ($output as $file) { |
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
TESTS_PATH="tests"; ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha $TESTS_PATH;open coverage/lcov-report/index.html; |
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
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOUR="\[\033[0m\]" | |
PS1="$GREEN\u@\h$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ " |
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 | |
lockdir='/tmp/my.lock' | |
if ! mkdir "${lockdir}" &>/dev/null ; then | |
echo "Lock failed - exit" >&2 | |
exit 1 | |
fi | |
rm -rf "${lockdir}" |
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
lsof -i TCP -a -p <PID> |
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 | |
git commit "$@" | |
current=$(date +%s) | |
# Yesterday at 6pm UTC | |
start=$(($current - $current % 86400 - 3600 * 6)) | |
# Yesterday at midnight UTC | |
end=$(($current - $current % 86400)) | |
nextEnd=$(($end + 86399)) | |
commitDate=$(( $start + $(bc -l <<< "$(($current - $end))/$(($nextEnd - $end))*$(($end - $start))" | awk '{print int($1+0.5)}'))) | |
echo "$(date -r$start) < $(date -r$commitDate) < $(date -r$end)" |
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
find . -name "*.log" -type f -exec egrep "event" {} \; | egrep -o "^[a-Z]+\s+[0-9]+" | sort | uniq -c | sort -n -k1 | tac |
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
find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n |
OlderNewer