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
desc 'Generate deck from Travis CI and publish to GitHub Pages.' | |
task :travis do | |
# if this is a pull request, do a simple build of the site and stop | |
if ENV['TRAVIS_PULL_REQUEST'].to_s.to_i > 0 | |
puts 'Pull request detected. Executing build only.' | |
sh 'bundle exec rake build' | |
next | |
end | |
repo = %x(git config remote.origin.url).gsub(/^git:/, 'https:').strip |
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
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
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 efistub-ucode-update@linux.path | |
sudo systemctl disable efistub-ucode-update@linux.service |
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
# Python http.server that sets Access-Control-Allow-Origin header. | |
# https://gist.github.com/razor-x/9542707 | |
import os | |
import sys | |
import http.server | |
import socketserver | |
PORT = 8000 |
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
# 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. |
OlderNewer