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
(ns xxx.jsonb-test | |
(:require | |
[clojure.test :refer [deftest is use-fixtures]] | |
[clojure.java.jdbc :as jdbc] | |
[cheshire.core :as json] | |
[xxx.db :as test-db :refer [*db*]]) | |
(:import | |
[org.postgresql.util PGobject] | |
[java.sql PreparedStatement])) |
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
#!/usr/bin/env bash | |
set -euf -o pipefail | |
[ -d Prebid.js ] || git clone https://github.com/prebid/Prebid.js.git | |
cd Prebid.js | |
git checkout 7.36.0 | |
npm ci | |
npx gulp build --modules=x,\ |
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
(defn partition-before | |
"Partition the input before (pred this-partition) returns true" | |
[pred items] | |
(if (seq items) | |
(reduce (fn [lists item] | |
(if (pred (concat (last lists) [item])) | |
(concat lists [[item]]) | |
(concat (butlast lists) [(concat (last lists) [item])]))) | |
[[(first items)]] | |
(rest items)) |
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
#!/usr/bin/env bash | |
set -exuf -o pipefail | |
for namespace in $(kubectl get -o name ns | grep -v namespace/kube- | sed 's/namespace\///') | |
do | |
for resource in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob --namespace "$namespace") | |
do | |
mkdir -p "$namespace/$(dirname "$resource")" | |
kubectl neat get -- -o=yaml --namespace "$namespace" "$resource" > "$namespace/$resource.yaml" |
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
require 'yaml' | |
require 'json' | |
assets = YAML.load_stream(STDIN.read) | |
type_map = { | |
'compute.googleapis.com/BackendService' => 'gcp:compute/backendService:BackendService', | |
'compute.googleapis.com/NetworkEndpointGroup' => 'gcp:compute/regionNetworkEndpointGroup:RegionNetworkEndpointGroup', | |
'compute.googleapis.com/UrlMap' => 'gcp:compute/uRLMap:URLMap', | |
'iam.googleapis.com/ServiceAccount' => 'gcp:serviceAccount/account:Account', |
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
tasks: | |
- init: yarn | |
command: yarn test:xmlserver | |
- init: | | |
cd demo | |
yarn | |
npm install -g expo-cli | |
command: | | |
cd demo | |
sed -i 's|http://0.0.0.0:8085|'"$(gp url 8085)"'|g' constants.js |
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/env bash | |
set -uf -o pipefail | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "git status is not clean" | |
exit 1 | |
fi | |
if [ $# -eq 0 ]; then |
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
(ns util.picomock-test | |
"https://github.com/audiogum/picomock" | |
(:require | |
[clojure.test :refer [deftest is testing]] | |
[picomock.core :as pico])) | |
(deftest picomock-test | |
(testing "without a function" | |
(let [mock (pico/mock)] | |
(is (nil? (mock))) |
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
Format: | |
needs: [] | |
image: an-image-with-zprint | |
script: | |
- zprintl -fsc $(cat list-of-files-that-should-be-formatted) |