http://redis.io/commands/lrange
Key: 'resque:queue:immediate' (list by KEYS *
)
redis-cli LRANGE 'resque:queue:immediate' 0 -1 | grep 'InferFeedUrl' | wc -l
(grep ruby job's class defined at hash key.)
http://redis.io/commands/lrange
Key: 'resque:queue:immediate' (list by KEYS *
)
redis-cli LRANGE 'resque:queue:immediate' 0 -1 | grep 'InferFeedUrl' | wc -l
(grep ruby job's class defined at hash key.)
Ruby will interprete variable inside "it block" before calling let. | |
So don't use the same varible name as let in the block. |
#161.246.34.191:-:161.246.34.195:-:sID.123456789012196:-:9999 | |
!interval::1 | |
!treshold::userCPU=51=89=180=180=300=999:-:usedMem=71=79=180=180=999=999:-:pUsedHdd=51=79=180=180=999=999:-:load5=1.50=1.79=180=180=200=999:-:load15=1.50=1.79=180=200=300=600 | |
#treshold::key,threshold1,threshold2,t1(time to warning),t2(time to critical),t3(special time for migrate),t4(extra time for migrate) ,remark load5 t3 and t2 must be different 20+ | |
$userCPU::sar -u 1 1 | sed -n 4,4p | awk '{print $4}' | |
$sysCPU::sar -u 1 1 | sed -n 4,4p | awk '{print $6}' | |
$load1::w | sed -n 1,1p |sed 's/.*: \(\)/\1/g' | cut -d, -f1 | |
$load5::w | sed -n 1,1p |sed 's/.*: \(\)/\1/g' | cut -d, -f2 | sed s/' '// | |
$load15::w | sed -n 1,1p |sed 's/.*: \(\)/\1/g' | cut -d, -f3 | sed s/' '// | |
$pUsedHdd::df | grep '\/$' | awk '{if($1~/sda/)$4=$5};END{print $4}' | sed s/%// |
;.MODEL SMALL | |
IMAGESG SEGMENT | |
AREA DB 0FFFFH DUP(99) ;BMP INTO | |
IMAGESG ENDS | |
DATASG SEGMENT | |
IMG DB "N1.BMP",0 ;PIC0 | |
DB "N2.BMP",0 ;PIC1 | |
DB "N3.BMP",0 ;PIC2 | |
DB "N4.BMP",0 ;PIC3 |
#!/bin/bash | |
cat $(find app/assets/stylesheets/ -type f) | | |
grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// | | |
while read CSS; do | |
if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then | |
echo $CSS >> unused.scss; | |
fi | |
done |
-module(third). | |
-export([maxThree/3,howManyEqual/3,eXOR/2]). | |
eXOR(X,Y) when is_boolean(X) andalso is_boolean(Y) -> | |
case {X,Y} of | |
{Y,X} -> false; | |
_ -> true | |
end. | |
maxThree(A,B,C) when is_integer(A) andalso is_integer(B) andalso is_integer(C) -> |
-module(four). | |
-export([fact/1,fib/1,pieces/1,tFib/1,perfect/1]). | |
fact(0) -> 1; | |
fact(N) when N>0 -> | |
fact(N-1)*N. | |
fib(0) -> 0; | |
fib(1) -> 1; | |
fib(N) when N>1 -> |
-module(asm). | |
-export([perimeter/1, area/1, areaEnclose/1, perimeterEnclose/1, bits/1]). | |
%% Shapes | |
% I am so sure about the requirements, and assume: | |
% 1. By "smallest enclosing rectangle", means both[0]: | |
% - Minimum-area enclosing rectangle | |
% - Minimum-perimeter enclosing rectangle | |
% 2. It does not base on coordinate system. | |
% |