By using ReturnType we don't have to manually write type for Context
See also gist for SolidJS https://gist.github.com/JLarky/a46055f673a2cb021db1a34449e3be07
And original tweet https://twitter.com/JLarky/status/1554152932425117697
By using ReturnType we don't have to manually write type for Context
See also gist for SolidJS https://gist.github.com/JLarky/a46055f673a2cb021db1a34449e3be07
And original tweet https://twitter.com/JLarky/status/1554152932425117697
| function mapAsync<T, U>(array: T[], callbackfn: (value: T, index: number, array: T[]) => Promise<U>): Promise<U[]> { | |
| return Promise.all(array.map(callbackfn)); | |
| } | |
| async function filterAsync<T>(array: T[], callbackfn: (value: T, index: number, array: T[]) => Promise<boolean>): Promise<T[]> { | |
| const filterMap = await mapAsync(array, callbackfn); | |
| return array.filter((value, index) => filterMap[index]); | |
| } |
| <div class="relative" style="padding-top: 56.25%"> | |
| <iframe class="absolute inset-0 w-full h-full" src="https://www.youtube-nocookie.com/embed/FMrtSHAAPhM" frameborder="0" …></iframe> | |
| </div> |
| CI & CD: | |
| ======== | |
| 2 core software development processes | |
| CI process of automating regular code commits followed by an automated build and test process designed to highlight intergration issues early. | |
| Additional tooling and functionality provided by Bamboo, CruiseControl, Jenkins, Go and TeamCity etc. | |
| workflow based | |
| CD takes the form of a workflow based process which accepts a tested software build payload from a CI server. Automates the deployment into a working QA, Pre-prod or Prod environment. | |
| AWS CodeDeploy and CodePipeline provide CI/CD services | |
| Elasticbeanstalk and CFN provide functionality which can be utilized by CI/CD servers. |
| interface PlainText extends String { | |
| __plaintext__: never | |
| } | |
| interface Base64Encoded extends String { | |
| __base64Encoded__: never | |
| } | |
| interface Encrypted extends String { | |
| __encrypted__: never | |
| } |
| version: '2' | |
| services: | |
| api: | |
| volumes: | |
| - "nfsmount:${CONTAINER_DIR}" | |
| volumes: | |
| nfsmount: | |
| driver: local | |
| driver_opts: |
Why another tutorial? Because there are other tutorials which write a server - client or maybe a client client where they have only two clients, maybe by hardcoding ips.
<rant>
What annoys me more is, that there are 100's of same tutroials on the internet,
that just works for a given scenario, but guess what, I don't fucking care what works
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
/usr/local/etc/dnsmasq.confaddress=/local/127.0.0.1
| BEGIN; | |
| DO $$ | |
| BEGIN | |
| IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'task_status') THEN | |
| create type task_status AS ENUM ('todo', 'doing', 'blocked', 'done'); | |
| END IF; | |
| END | |
| $$; | |
| CREATE TABLE IF NOT EXISTS |
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkeyfor a Primary Key constraint;keyfor a Unique constraint;exclfor an Exclusion constraint;idxfor any other kind of index;