This file contains 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
alter table example_table | |
alter column id drop default, | |
alter column id set data type uuid using uuid_generate_v5(uuid_ns_url(), id::text), | |
alter column id set default gen_random_uuid(); |
This file contains 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
insert into currencies (code, "name") values | |
('AED', 'VAE-Dirham'), | |
('AFN', 'Afghani'), | |
('ALL', 'Albanischer Lek'), | |
('AMD', 'Armenischer Dram'), | |
('ANG', 'Antillen-Gulden'), | |
('AOA', 'Kwanza'), | |
('ARS', 'Argentinischer Peso'), | |
('AUD', 'Australischer Dollar'), | |
('AWG', 'Aruba-Florin'), |
This file contains 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
insert into countries ("name", code) values | |
('Afghanistan', 'AFG'), | |
('Åland', 'ALA'), | |
('Albanien', 'ALB'), | |
('Algerien', 'DZA'), | |
('Amerikanisch-Samoa', 'ASM'), | |
('Andorra', 'AND'), | |
('Angola', 'AGO'), | |
('Anguilla', 'AIA'), | |
('Antarktis', 'ATA'), |
This file contains 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
-- Generated on 2021-04-08 | |
insert into "make" ("id", "name") values (1, 'Abarth'); | |
insert into "model" ("brand", "name") values (1, '124 Spider'); | |
insert into "model" ("brand", "name") values (1, '500'); | |
insert into "model" ("brand", "name") values (1, '500C'); | |
insert into "model" ("brand", "name") values (1, '595'); | |
insert into "model" ("brand", "name") values (1, '595 Competizione'); | |
insert into "model" ("brand", "name") values (1, '595 Turismo'); | |
insert into "model" ("brand", "name") values (1, '595C'); |
This file contains 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
// Inspired by https://gist.github.com/kyranjamie/646386d5edc174e8b549111572897f81 | |
// see https://gist.github.com/KingDarBoja/cf664cc395c4d95e645fd1f720c13746 for the three-letter-variant | |
export enum Country { | |
AF = 'Afghanistan', | |
AX = 'AlandIslands', | |
AL = 'Albania', | |
DZ = 'Algeria', | |
AS = 'American Samoa', | |
AD = 'Andorra', | |
AO = 'Angola', |
This file contains 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
import { Module } from '@nestjs/common'; | |
import { MyLibModule } from './my-lib.module'; | |
@Module({ | |
imports: [ | |
MyLibModule.register({ name: 'Enzo' }), | |
] | |
}) | |
export class ImportingModule {} |
This file contains 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
<html> | |
<head> | |
<style> | |
.no-decoration, | |
.no-decoration:hover { | |
color: inherit; | |
text-decoration: none; | |
} |
This file contains 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
const performARequest = () => { | |
const httpRequest = new XMLHttpRequest(); | |
httpRequest.onreadystatechange = () => { | |
if (httpRequest.readyState === 4 && httpRequest.status === 200) { | |
console.log('Request successful!'); | |
} | |
}; | |
httpRequest.open('GET', window.ENVIRONMENT.backendUrl + '/users/john'); | |
httpRequest.send(); |
This file contains 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
/** | |
* Represents the environment variables for PRODUCTION environment. | |
*/ | |
(function (window) { | |
'use strict'; | |
window['ENVIRONMENT'] = { | |
backendUrl: 'https://prod.my-backend.com' | |
}; |
This file contains 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 lang="de"> | |
<head> | |
<!-- Some more stuff here... --> | |
<!-- Our environment variables will be injected here --> | |
<!-- build:environment-vars --><!-- endbuild --> | |
</head> | |
<body> |
NewerOlder