Cor — A minimal OO proposal for the Perl core
This is version 0.10 of this document.
// 100-score solution for http://codility.com/demo/take-sample-test/ | |
function equi(array) { | |
var i, | |
len = array.length, | |
sum = 0, | |
leftSum = 0, | |
rightSum; | |
for (i = 0; i < len; i++) { |
<?php | |
# | |
# Copyright (c) 2014 Guillaume <maethor> Subiron (http://www.sysnove.fr/) | |
# Plugin: check_nginx_status | |
# | |
$colors = array( | |
'read' => '#5a3d99', | |
'write' => '#ff0000', | |
'wait' => '#e5ca44', |
xstat() { | |
for target in "${@}"; do | |
inode=$(ls -di "${target}" | cut -d ' ' -f 1) | |
fs=$(df "${target}" | tail -1 | awk '{print $1}') | |
crtime=$(sudo debugfs -R 'stat <'"${inode}"'>' "${fs}" 2>/dev/null | | |
grep -oP 'crtime.*--\s*\K.*') | |
printf "%s\t%s\n" "${crtime}" "${target}" | |
done | |
} |