Skip to content

Instantly share code, notes, and snippets.

@thanhpd-teko
thanhpd-teko / glcoud-signed-url.go
Created September 20, 2020 09:49 — forked from poindextrose/glcoud-signed-url.go
Example on how to create a signed URL on Google Cloud Storage with Go
package main
import (
"fmt"
"time"
"google.golang.org/cloud/storage"
)
const (
@thanhpd-teko
thanhpd-teko / read-access.sql
Created December 19, 2019 07:38 — 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;
@thanhpd-teko
thanhpd-teko / nginx.conf
Created December 19, 2019 04:00 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@thanhpd-teko
thanhpd-teko / README.md
Created April 16, 2019 04:02
product listing integeration

Listing library

Listing library is a Python library for index product data from catalog, ppm, warehouse, sell, rating to elastic search

Installation

Use the package manager pip to install listing-lib.

pip install git+git+https://[email protected]/teko-vn/es-updater.git