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
PLANETSCALE_DB=brandnewdb | |
PLANETSCALE_BRANCH=mybranch | |
PLANETSCALE_ORG=jonico | |
PLANETSCALE_SERVICE_TOKEN=pscale_tkn_loCzIH7NktDK-GWJ71eX97Qr5D3a9iEO_pgHCSHUtw | |
PLANETSCALE_SERVICE_TOKEN_NAME=69xrlIwgs4ms |
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
#!/bin/sh | |
# shell script that waits for a PlanetScale branch to be ready for use and increases retry times exponentially | |
# usage: wait-for-ps-branch-readiness.sh <db name> <branch name> <max retries> | |
function wait_for_branch_readiness { | |
local retries=$1 | |
local db=$2 | |
local branch=$3 |
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
# copy Azure bloc storage files to S3 buckets | |
# | |
# Usage: | |
# ./copy-azure-blob-storage-to-s3.sh <blob storage container> <s3 bucket> | |
# | |
# Example: | |
# ./copy-azure-blob-storage-to-s3.sh my-container s3://my-bucket | |
# | |
# Note: | |
# This script requires a working Azure CLI. |
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
#!/usr/bin/bash | |
cd | |
mkdir -p /tmp/actions | |
git clone https://github.com/github/platform-samples.git | |
sdk install groovy | |
cd platform-samples/api/groovy/ | |
groovy ListReposInOrg.groovy -t $GH_PUBLIC actions > ~/repo-list | |
cd | |
wget https://github.com/actions/actions-sync/releases/download/v202009231612/gh_202009231612_linux_amd64.tar.gz |
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
apiVersion: v1 | |
items: | |
- apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: "2021-04-29T15:09:09Z" | |
labels: | |
pod-template-hash: 65f67dcb66 | |
runner-deployment-name: actions-runner-deployment-epona | |
runner-template-hash: 6788f4694c |
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
# Replace the string "Hyrule" with your search pattern - only run on backup system - will take a LOOOONG time to run through | |
ghe-console -y <<'ENDSCRIPT' | |
Repository.find_each do |repository| | |
if repository.active && !repository.empty? then | |
host,path = GitHub::Routing.lookup_route(repository.nwo) | |
puts "Processing repo #{repository.nwo} ..." | |
refs=`git --git-dir=#{path} rev-list --branches --tags | sort | uniq` | |
refs.each_line do |ref| | |
if system("git --git-dir=#{path} grep 'Hyrule' #{ref}") | |
puts "Found pattern in ref #{ref} in repo #{repository.nwo}: " |
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
ghe-console -y <<'ENDSCRIPT' | |
ActiveRecord::Base.connected_to(role: :reading) do | |
puts "Version 0.2.0" | |
emails = Set.new | |
start_time = 90.days.ago.beginning_of_day | |
Repository.where(active: true).find_each do |repo| | |
Push | |
.where(repository: repo) | |
.where("created_at >= ?", start_time) | |
.find_each do |push| |
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
name: Build and publish Docker image + Container Scanning | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
outputs: | |
dockerimage: ${{ steps.dockerimage.outputs.dockerimage }} | |
enablecontainerscanning: ${{ steps.enablecontainerscanning.outputs.enablecontainerscanning }} |
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: |
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
{ | |
repository(owner: "rails", name: "rails") { | |
nameWithOwner | |
description | |
dependencyGraphManifests(withDependencies: true) { | |
nodes { | |
filename | |
dependenciesCount | |
exceedsMaxSize | |
parseable |