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-test | |
(:require [clojure.test :refer [deftest use-fixtures]] | |
[clj-http.client :as http] | |
[cheshire.core :as json]) | |
(:import (com.github.tomakehurst.wiremock.core WireMockConfiguration) | |
(com.github.tomakehurst.wiremock WireMockServer) | |
(com.github.tomakehurst.wiremock.client WireMock))) | |
(def ^:dynamic *server* nil) |
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
ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(ARGF.read).map { |obj| obj["bids"].select! { |bid| bid["bidder"] == "pubmatic" }; obj })' |
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 xxxxxx.jsonb-test | |
(:require | |
[clojure.test :refer [deftest is use-fixtures join-fixtures]] | |
[cheshire.core :as json] | |
[clojure.java.jdbc :as jdbc] | |
[xxxxxxx.test-db :refer [*db*] :as test-db]) | |
(:import | |
(org.postgresql.util PGobject) | |
(clojure.lang IPersistentMap))) |
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 yyyyyyyyyyaaaaaaaaaaa | |
(:import | |
(com.google.auth.oauth2 GoogleCredentials IdTokenCredentials)) | |
(:require | |
[clj-http.client :as client])) | |
(def root "https://bang.a.run.app") | |
(defn get-access-token | |
[] |
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
$('video').playbackRate = 4; |
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', |