Skip to content

Instantly share code, notes, and snippets.

@handuy
handuy / 2.sql
Last active September 16, 2018 14:34
Cú pháp chạy: psql -U postgres -f [tên_file]. Chạy file 2.sql ở citus_master, 2_test.sql ở citus_worker_1
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS posts;
DROP SCHEMA IF EXISTS course CASCADE;
CREATE SCHEMA course;
CREATE TABLE users (id int, name text, age int);
@handuy
handuy / 4.sql
Created September 16, 2018 14:41
Cú pháp chạy: psql -U postgres -f 4.sql. Chạy ở citus_master
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS posts;
DROP SCHEMA IF EXISTS course CASCADE;
CREATE TABLE users (id int PRIMARY KEY, name text, age int);
CREATE TABLE posts (id int PRIMARY KEY, title text, author_id int REFERENCES users(id));
@handuy
handuy / 5.sql
Created September 16, 2018 15:09
Cú pháp chạy: psql -U postgres -f [tên_file]. Chạy ở citus_master
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS posts CASCADE;
DROP SCHEMA IF EXISTS course CASCADE;
CREATE TABLE users (id int PRIMARY KEY, name text, age int);
CREATE TABLE posts (id int PRIMARY KEY, title text, author_id int REFERENCES users(id));
@handuy
handuy / 3.sql
Last active September 16, 2018 15:20
Cú pháp chạy: psql -U postgres -f [tên_file]. Chạy file 3.sql ở citus_woker_1, 3_test.sql ở citus_master
DROP TABLE IF EXISTS series;
CREATE TABLE series (id int, description text);
SELECT create_reference_table('series');
WEBVTT
1
00:00:00.000 --> 00:00:02.325
[MUSIC PLAYING]
2
00:00:05.427 --> 00:00:06.260
KAYCE BASQUES: Hola!
@handuy
handuy / import.sql
Created April 1, 2020 08:10
Import CSV to SQL Server
USE corona;
GO
BULK INSERT covid FROM '/COVID-19-geographic-disbtribution-worldwide (1).csv'
WITH (
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
);
GO
-- Tạo bảng
CREATE TABLE [dbo].[deliver_2018](
[DELIVERY_NO] [varchar](50) NULL,
[DEALER_CODE] [int] NULL,
[MODEL_CODE] [varchar](50) NULL,
[TYPE_CODE] [varchar](50) NULL,
[COLOR_CODE] [varchar](50) NULL,
[F_HEADER] [varchar](50) NULL,
[F_NO] [int] NULL,
[E_HEADER] [varchar](50) NULL,
-- Cập nhật cột SomayHVN_mapping ở bảng registration
update top (100) registration_2018 set SomayHVN_mapping = 'JF86E0036270'
update top (100) registration_2019 set SomayHVN_mapping = 'JF86E0036270'
-- Tạo bảng trung gian
create table report_1de (
DEALER_CODE varchar(50),
deliver_tinh varchar(50),
Arrival_month int,
@handuy
handuy / gitlab-ssh-config.md
Created November 28, 2023 08:30 — forked from projected1/gitlab-ssh-config.md
GitLab SSH Configuration.

GitLab SSH Config

This tutorial will help you to configure your GitLab SSH keys. Once configured, you should be able to clone repositories, push your changes and submit your pull requests to GitLab repositories via SSH.

Unless otherwise noted, all instructions are for the Window environment. If you are looking for instructions for Linux or MAC OS, please consult the official documentation instead.

Generating a New SSH Key

If not already installed, install Git for Windows.