- chrome
- 1pass
- intelliJ COMMUNITY (ou Ultimate)
- vscode
- enable settings sync with github
- dropbox
- spectable
- skype
- teamviewer
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
| Edit /var/lib/postgres/data/postgresql.conf: | |
| # change IP on subscriber | |
| listen_addresses = '*' | |
| wal_level = logical | |
| shared_preload_libraries = 'pglogical' | |
| max_worker_processes = 16 | |
| max_wal_senders = 16 | |
| max_replication_slots = 16 | |
| track_commit_timestamp = on |
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
| const validator = new Validator('http://example.com/swagger.yaml') | |
| await validator.init() | |
| validator.validate('UserCreated', payload) |
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
| asd.js |
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
| const withQuotes = (value, quote = '\'') => { | |
| if (typeof value === 'undefined') { | |
| return 'null' | |
| } | |
| if (value === null) { | |
| return 'null' | |
| } | |
| return `${quote}${value}${quote}` |
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
| // CREATE TABLE realtime_table (id serial primary key, title varchar, year varchar, producer varchar); | |
| // CREATE FUNCTION notify_trigger() RETURNS trigger AS $$ | |
| // DECLARE | |
| // BEGIN | |
| // PERFORM pg_notify('watch_realtime_table', row_to_json(NEW)::text); | |
| // RETURN new; | |
| // END; | |
| // $$ LANGUAGE plpgsql; | |
| // CREATE TRIGGER watch_realtime_table_trigger AFTER INSERT ON realtime_table |
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
| function prefixedSum(array) { | |
| const sum = new Array(array.length + 1) | |
| sum[0] = 0 | |
| for(let k = 1; k < sum.length; k++) { | |
| sum[k] = (sum[k - 1] || 0) + array[k - 1] | |
| } | |
| return sum | |
| } |
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
| https://www.npmjs.com/package/tls-keygen |
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
| import logging | |
| logging.basicConfig(filename='output.log', filemode='w', level=logging.WARNING) | |
| logging.warning('poor man\'s debugging') |
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
| #! /bin/bash | |
| set -e | |
| set -u | |
| # redis-cli --raw FLUSHALL >/dev/null 2>%1; # uncomment to clear the database | |
| function hash () { | |
| printf %s "$1" | md5sum | cut -f1 -d' ' | |
| } |