Skip to content

Instantly share code, notes, and snippets.

View voskobovich's full-sized avatar

Vitalii Voskobovich voskobovich

View GitHub Profile
@voskobovich
voskobovich / gist:d746899b1488beee69505193dfcc1d46
Created April 3, 2016 16:46
Yii2 Basic Nginx Host Config Example
server {
listen 80;
server_name www.hostname.com;
rewrite ^(.+)$ http://hostname.com permanent;
}
server {
charset utf-8;
client_max_body_size 128M;
@voskobovich
voskobovich / gist:537b2000108e4781f70b
Last active April 17, 2024 14:57
List of most currency ISO code and symbol format in SQL.
DROP TABLE currency;
-- Create table variable
CREATE TABLE currency (
name VARCHAR(20),
code VARCHAR(3),
symbol VARCHAR(5)
);
ALTER TABLE currency CONVERT TO CHARACTER SET utf8;
@voskobovich
voskobovich / gist:43f851859c23a8261514
Last active January 7, 2023 10:09
The list of countries with currency (ISO code and symbol) format in SQL.
DROP TABLE currency;
-- Create table variable
CREATE TABLE currency (
country VARCHAR(100),
currency VARCHAR(100),
code VARCHAR(100),
symbol VARCHAR(100)
);
@voskobovich
voskobovich / cors-nginx.conf
Created February 15, 2016 07:22 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@voskobovich
voskobovich / nginx.conf
Last active February 14, 2016 15:45 — 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;
#
# A limitation to this method is that Nginx doesn't currently send headers