This file contains hidden or 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
git branch -D `git branch --merged | grep -v \* | xargs` |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress-ih | |
namespace: default | |
spec: | |
rules: | |
- host: web.meudominio.com.br | |
http: | |
paths: |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: web | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
run: web | |
template: |
This file contains hidden or 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
public static <T> Collector<T, ?, List<T>> lastN(int n) { | |
return Collector.<T, Deque<T>, List<T>>of(ArrayDeque::new, (acc, t) -> { | |
if(acc.size() == n) | |
acc.pollFirst(); | |
acc.add(t); | |
}, (acc1, acc2) -> { | |
while(acc2.size() < n && !acc1.isEmpty()) { | |
acc2.addFirst(acc1.pollLast()); | |
} | |
return acc2; |
This file contains hidden or 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
select count(*) from | |
tb_lotacao le where le.ctid <> (select min(li.ctid) from tb_lotacao li | |
where li.co_pessoa = le.co_pessoa and li.ds_mes_ano = le.ds_mes_ano and li.co_unidade = le.co_unidade) |
This file contains hidden or 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
SELECT | |
schemaname, | |
relname as "Table", | |
pg_size_pretty(pg_total_relation_size(relid)) As "Size", | |
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size" | |
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC; |
This file contains hidden or 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
RUN echo "America/Sao_Paulo" > /etc/timezone \ | |
&& dpkg-reconfigure -f noninteractive tzdata |
This file contains hidden or 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
async function teste() { | |
var namespace = 'br.com.synapsetec'; | |
var producerType = 'Producer'; | |
var producerNS = namespace + '.' + producerType; | |
const AdminConnection = require('composer-admin').AdminConnection; | |
const BusinessNetworkConnection = require('composer-client').BusinessNetworkConnection; | |
const cardStore = require('composer-common').NetworkCardStoreManager.getCardStore(); | |
const { IdCard } = require('composer-common'); | |
businessNetworkConnection = new BusinessNetworkConnection({ cardStore: cardStore }); |
This file contains hidden or 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
mongoimport -d akulaapi -c bancos --type csv --file bancos.csv --headerline | |
mongodump --db test --collection collection | |
mongorestore --collection people --db accounts dump/ |
This file contains hidden or 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
console.log(Object.keys(location.rawAttributes)); |