Skip to content

Instantly share code, notes, and snippets.

View Dkorniloff's full-sized avatar

Dmitriy Kornilov Dkorniloff

View GitHub Profile
#!/bin/bash
# https://gist.github.com/Hedgehogues/123eb27100608d248cf8370e666b29ce/
# declare array of tools
declare -a tools=(
"DataGrip"
"CLion"
"Rider"
"WebStorm"
"GoLand"
@Dkorniloff
Dkorniloff / read-access.sql
Created February 2, 2022 05:05 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@Dkorniloff
Dkorniloff / metrials-go.md
Created February 17, 2020 08:17 — forked from egorsmkv/metrials-go.md
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
@Dkorniloff
Dkorniloff / sample.js
Created November 8, 2019 06:08 — forked from manix/sample.js
Improved "fieldSorter"
function fieldSorterOptimized(fields) {
var dir = [], i, l = fields.length;
fields = fields.map(function(o, i) {
if (o[0] === "-") {
dir[i] = -1;
o = o.substring(1);
} else {
dir[i] = 1;
}
return o;