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 table by name | |
SELECT string_agg(table_name, ', ') | |
FROM information_schema.tables | |
WHERE table_schema='public' | |
AND table_type='BASE TABLE' | |
AND table_name like 't_%' | |
-- select only empty tables | |
select | |
string_agg(relname, ', ') |
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
for file in *.jpg; do convert $file -resize 1000 $file; done |
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
# sample command from dockerhub | |
docker run --name some-mongo -d mongo:tag | |
# but to make mongo available from localhost you should change this command a bit | |
docker run --name some-mongo -p 27017:27017 -d mongo:tag | |
# so now you can connect to the mongo using the next command | |
mongo -host localhost -port 27017 |
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
sudo nano /etc/postgresql/12/main/pg_hba.conf | |
# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 trust |
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
# Check the existing value | |
SHOW VARIABLES LIKE '%group_concat%'; | |
# Setup a new one | |
SET SESSION group_concat_max_len = 100500; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>bin to dec</title> | |
</head> | |
<body> | |
<div> | |
<label for="bin">Enter binary number: </label> | |
<input type="text" name="bin" id="bin"><br/> | |
<span>Decimal: <span id="dec"></span></span> |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "SpecificTable", | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:Scan" | |
], | |
"Resource": "arn:aws:dynamodb:eu-central-1:default:table/tableName" |
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
1. Check existed avds | |
emulator -list-avds | |
2. Run (in my case it is Nexus_5X_API_28_x86) | |
emulator -avd Nexus_5X_API_28_x86 |
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
rm -rf android/app/build/outputs/apk/debug/* |
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
version: '3' | |
services: | |
db: | |
image: postgres:13 | |
volumes: | |
- db-data:/var/lib/postgresql/data/pgdata | |
ports: | |
- 5432:5432/tcp | |
environment: | |
- POSTGRES_PASSWORD=odoo |