A comprehensive guide for setting up a secure private Docker registry with authentication, UI, backup, and restoration capabilities.
This file contains hidden or 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
/** | |
* A Mutex (Mutual Exclusion) class to ensure a task runs exclusively. | |
* It prevents race conditions in asynchronous code by ensuring only one task | |
* can access a shared resource at a time. | |
*/ | |
export class Mutex { | |
private _isLocked: boolean = false; | |
private _taskQueue: Array<() => void> = []; | |
/** |
This file contains hidden or 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
type Success<T> = { | |
data: T; | |
error: null; | |
}; | |
type Failure<E> = { | |
data: null; | |
error: E; | |
}; |
This file contains hidden or 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
export type FrameTicker = (deltaTime: number) => void; | |
/** | |
* Creates smooth animation frames. | |
* | |
* @param frameTicker This callback will be called on each frame.\ | |
* The `deltaTime` argument specifies the time elapsed between the last frame | |
* and the one preceding it (in milliseconds). | |
* @returns Returns animation frames controller. | |
*/ |
This file contains hidden or 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
/** | |
* Linear interpolate on the scale given by `a` to `b`, using `t` as the point on that scale. | |
*/ | |
export const lerp = (a: number, b: number, t: number) => a + t * (b - a); | |
/** | |
* Inverse Linar Interpolation, get the fraction between `a` and `b` on which `v` resides. | |
*/ | |
export const inLerp = (a: number, b: number, v: number) => (v - a) / (b - a); |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
This file contains hidden or 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
// app/modules/authentication/authentication.controller.ts | |
import { Body, Controller, Post } from '@nestjs/common' | |
import { RegisterRequest } from './requests' | |
import { User } from '../../modules/user' | |
import { UsersService } from '../users/users.service' |
This file contains hidden or 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
Balsamiq Wireframes for Desktop full license key free | |
This old name is Balsamiq Mockups now the company changing the name to Balsamiq Wireframes for Desktop insteed | |
HOW TO: | |
First download softwere here: https://balsamiq.com/wireframes/desktop/ | |
Install and follow screen direction | |
Use below serial: | |
===================================================================================== |
- Docker Hub - One private repo/image spot for free
- Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
- Canister - 20 private repos with almost no limits on free tier
- Code Fresh - Free tier for developers
- Setup Private Docker Registry - Digital Ocean hosted Tutorial
apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
NewerOlder