-novid
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 type { Middleware, createWithEdgeSpec } from 'edgespec' | |
const users: Record<string, { userId }> = { | |
fake_api_key1: { userId: 'fake-user-id-1' }, | |
} | |
const withApiKey: Middleware = (req, ctx, next) => { | |
const apiKey = req.headers.get('authorization').split('Bearer ') | |
req.user = users[apiKey] | |
return next() |
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
sudo mkdir /efi | |
# move efi mount | |
sudo rm -rf /boot/efi | |
# remove linux bootloader and kernals on /efi | |
# backup /boot | |
# reformat /boot to vfat | |
# copy /boot data back | |
# update UUID in fstab | |
sudo systemctl disable [email protected] | |
sudo systemctl disable [email protected] |
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
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" |
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
# TODO: Setup https://github.com/silvermine/serverless-plugin-cloudfront-lambda-edge | |
sentryOriginReq: | |
handler: handlers/handler.default | |
lambdaAtEdge: | |
distribution: AppDistribution | |
eventType: origin-request | |
includeBody: true | |
pathPattern: /_tunnel # TODO: Choose tunnel path. |
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 type { | |
NormalizedCacheObject, | |
PossibleTypesMap, | |
Resolvers, | |
TypePolicies | |
} from '@apollo/client' | |
import { | |
ApolloClient as Client, | |
InMemoryCache, | |
createHttpLink, |
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 { createHttpClient } from '@meltwater/mlabs-http' | |
export default ({ githubOrg, githubToken, log }) => | |
async (packageName, packageType = 'container') => { | |
if (!packageName) throw new Error('Missing packageName') | |
const client = createPackagesClient({ | |
packageName, | |
packageType, | |
org: githubOrg, |
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
export * from '@meltwater/phi' | |
export { | |
noCase, | |
dotCase, | |
swapCase, | |
pathCase, | |
upperCase, | |
lowerCase, | |
camelCase, | |
snakeCase, |
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
#!/bin/bash | |
set -e | |
set -u | |
if [ ! "${TRAVIS:-}" = 'true' ]; then | |
echo 'This is not running on Travis CI. Exiting!' | |
exit 1 | |
fi |
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
# | |
# Local Environment | |
# | |
home_dir = Dir.home | |
chef_dir = File.join(home_dir, '.chef') | |
secret_dir = File.join(chef_dir, 'private') | |
organization = ENV['chef_org'] || 'the_organization_name' | |
knife_override = File.join(chef_dir, 'knife_override.rb') | |
username = (ENV['USER'] || ENV['USERNAME']).downcase |
NewerOlder