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
version: "3.3" | |
services: | |
portainer: | |
image: portainer/portainer-ce:2.19.0 | |
container_name: portainer | |
restart: always | |
labels: | |
- "traefik.docker.network=public-web" | |
- "traefik.enable=true" |
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
Mix.install([ | |
{:postgrex, "~> 0.15.0"} | |
]) | |
{defmodule MyMod do | |
def main do | |
{:ok, pid} = | |
Tds.start_link( | |
hostname: "localhost", | |
username: "sa", |
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
CREATE DOMAIN public.sid AS CHAR(8); | |
CREATE OR REPLACE FUNCTION cast_uuid_as_sid(uuid) | |
RETURNS sid | |
LANGUAGE SQL AS | |
$$ SELECT substr($1::text,1,8)::sid $$; | |
CREATE OR REPLACE FUNCTION eq_uuid_sid(id1 uuid, id2 sid) | |
RETURNS BOOLEAN | |
LANGUAGE SQL AS |
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
.grigua-css h1 { | |
font-style: italic; | |
} |
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
.grigua-css h1 { | |
font-style: italic; | |
} |
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
.grigua-css h1 { | |
font-style: italic; | |
} |
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
// npm i mongodb | |
const { MongoClient } = require('mongodb'); | |
const MONGODB_URI = 'mongodb://localhost:27021/testdata'; | |
let mongoConnection = null; | |
const getMongo = async () => { | |
if (!mongoConnection){ |
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
CREATE LOGIN myUserName WITH PASSWORD = 'pwd'; | |
USE My_Database | |
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'myUserName') | |
BEGIN | |
CREATE USER [myUserName] FOR LOGIN [myUserName] | |
EXEC sp_addrolemember N'db_owner', N'myUserName' | |
END; |
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
CREATE FUNCTION SplitInts | |
( | |
@list varchar(8000), | |
@delimiter char(1) = '#' | |
) | |
RETURNS TABLE WITH SCHEMABINDING | |
AS | |
RETURN ( | |
SELECT [value] from ( | |
SELECT [value] = cast(y.i.value('(./text())[1]', 'varchar(8000)') as int) |
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 fs_orig = require('fs'); | |
const util = require('util'); | |
const fs = { | |
readdir: util.promisify(fs_orig.readdir), | |
rename: util.promisify(fs_orig.rename), | |
} | |
const l = console.log.bind(console); |
NewerOlder