Things needed:
- A domain that is tied to Cloudflare (free CF account is probably enough, depends on the load to your CDN)
- Make a Cloudflare R2 bucket > Take a note of its bucket name.
Things needed:
import { Client, ServiceError, Metadata, CallOptions, ClientUnaryCall } from '@grpc/grpc-js'; | |
import { Message } from 'google-protobuf'; | |
type OriginalCall<T, U> = (request: T, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError, res: U) => void) => ClientUnaryCall; | |
type PromisifiedCall<T, U> = ((request: T, metadata?: Metadata, options?: Partial<CallOptions>) => Promise<U>); | |
export type Promisified<C> = { $: C; } & { | |
[prop in Exclude<keyof C, keyof Client>]: (C[prop] extends OriginalCall<infer T, infer U> ? PromisifiedCall<T, U> : never); | |
} |
#pragma once | |
#define TAPPING_FORCE_HOLD_PER_KEY |
Automatically unsealing Vault drastically reduces the security of the stored secrets. That being said, there might be scenarios, in which this simple approach could be useful / sufficient.
This requires Vault to be started by a systemd-unit named vault.service
, which typically is the case when installing from a distribution package.
The script vault-unseal.sh
should be placed in /root
and secured with 700
permissions.
/** | |
* cloudflare-worker-youtube-dl.js | |
* Get direct links to YouTube videos using Cloudflare Workers. | |
* | |
* Usage: | |
* GET /?v=dQw4w9WgXcQ | |
* -> Returns a JSON list of supported formats | |
* | |
* GET /?v=dQw4w9WgXcQ&f=251 | |
* -> Returns a stream of the specified format ID |
GraphQL has exploded in popularity since its open-source announcement in 2015. For developers who had spent a lot of time managing data transformations from their back-end infrastructure to match front-end product needs, GraphQL felt like a tremendous step forwards. Gone were the days of hand-writing BFFs to manage problems of over-fetching.
A lot of value proposition arguments around GraphQL have been about over/under fetching, getting the data shape you ask for, etc. But I think GraphQL provides us more than that—it gives us an opportunity to raise the level of abstraction of our domain, and by doing so allow us to write more robust applications that accurately model the problems we face in the real world (changing requirements, one-off issues).
An underappreciated feature of GraphQL is its type system, and in particular features like [union types](https:
declare module 'cloudinary-react' { | |
type CropMode = | |
| string | |
| 'scale' | |
| 'fit' | |
| 'limit' | |
| 'mfit' | |
| 'fill' | |
| 'lfill' | |
| 'pad' |
/*------------------------------------------------*/ | |
/* LIBRARIES | |
/*------------------------------------------------*/ | |
import throttle from 'lodash/throttle'; | |
/*------------------------------------------------*/ | |
/* INTERNAL DEPENDENCIES | |
/*------------------------------------------------*/ | |
import { MAIN_APP_SIDEBAR_ID } from '../../constants/global'; |
I keep fixing this up, but if it fails for you, check if these are better maintained https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.
Cloning the repo using one of the below techniques should work correctly but you may still be getting an unrecognized import error.
As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:
GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME
The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.
#!/usr/bin/env bash | |
# Credit: https://twitter.com/_fel1x | |
# poc: https://twitter.com/_fel1x/status/1151487051986087936 | |
# Adapted to GKE/kube-proxy by: https://twitter.com/bradgeesaman | |
# and to avoid detection by Falco's default rules | |
read -r -d '' ESCAPE <<'EOF' | |
#!/bin/sh |