Skip to content

Instantly share code, notes, and snippets.

View uchilaka's full-sized avatar

Uchenna Chilaka uchilaka

View GitHub Profile
@uchilaka
uchilaka / cloudbuild.yaml
Created November 27, 2020 09:48 — forked from tam7t/cloudbuild.yaml
Access Google Secret Manager from Cloud Build step
# Usage: gcloud builds submit --no-source
#
# Remember to first grant the cloud build service account permissions to access
# secret 'foo'
#
# gcloud beta secrets add-iam-policy-binding foo \
# --member=serviceAccount:<project-number>@cloudbuild.gserviceaccount.com \
# --role=roles/secretmanager.secretAccessor
steps:
# fetch the secret and write to a volume
@uchilaka
uchilaka / mock_dialogs.js
Created November 13, 2020 17:05 — forked from apeckham/mock_dialogs.js
mock javascript alert, confirm, prompt
var MockPrompt = {
install: function() {
MockPrompt.message = undefined;
MockPrompt.value = undefined;
MockPrompt.returnValue = undefined;
MockPrompt.originalPrompt = window.prompt;
window.prompt = function(message, value) {
MockPrompt.message = message;
MockPrompt.value = value;
@uchilaka
uchilaka / .gitconfig
Created June 9, 2020 13:51 — forked from rambabusaravanan/.gitconfig
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@uchilaka
uchilaka / docker-compose.yml
Created October 7, 2019 14:18 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.