A smart way to build a string:
my $curl = <<"ENDEND";
curl 'https://my-tools/endpoint' \
--data-raw '$firstId,$secondId' \
--compressed
ENDEND
A smart way to build a string:
my $curl = <<"ENDEND";
curl 'https://my-tools/endpoint' \
--data-raw '$firstId,$secondId' \
--compressed
ENDEND
Dancer framework - step by step:
apt-get install build-essential
cpan install Dancer2
Wylistowanie indeksów:
GET /_cat/indices?v
Aliasy:
GET /_cat/aliases?v
Wyszukanie wszystkiego:
uruchomienie testów:
lein midje :autotest
podwójny warunek z wyrażeniem regularnym zamiast like
db.getCollection('views').find( { $and: [ { "sellerId": "16" }, { "name": /.*test.*/ } ] } )
grupowanie wpisów z określoną cechą
db.getCollection('cItems').aggregate([{$group: {_id : "$sellerId", number: { $sum : 1} }}] )
wyrażenia regularne
Statystyki
`SELECT table_schema "Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "MB Size" FROM information_schema.tables GROUP BY table_schema;`
Inna forma
`SELECT count(*) tables, table_schema,concat(round(sum(table_rows)/1000000,2),' MB') rows, concat(round(sum(data_length)/(1024*1024*1024),2),' GB') data, concat(round(sum(index_length)/(1024*1024*1024),2),' GB') idx, concat(round(sum(data_length+index_length)/(1024*1024*1024),2),' GB') total_size, round(sum(index_length)/sum(data_length),2) idxfrac FROM information_schema.TABLES GROUP BY table_schema ORDER BY sum(data_length+index_length) DESC LIMIT 100;`
Lista procesów: