Skip to content

Instantly share code, notes, and snippets.

View bhr's full-sized avatar

Benedikt Hirmer bhr

View GitHub Profile
[{"name":"require events","ph":"X","pid":1,"ts":91388669621.132,"dur":26.9739990234375},{"name":"require ./lib/compat","ph":"X","pid":1,"ts":91388668287.457,"dur":1431.156005859375},{"name":"require ./lib/compat","ph":"X","pid":1,"ts":91388669947.421,"dur":9.595001220703125},{"name":"require path","ph":"X","pid":1,"ts":91388669985.651,"dur":17.845001220703125},{"name":"require depd","ph":"X","pid":1,"ts":91388666525.042,"dur":3546.636993408203},{"name":"require body-parser","ph":"X","pid":1,"ts":91388664952.307,"dur":5753.86799621582},{"name":"require events","ph":"X","pid":1,"ts":91388670715.671,"dur":15.030990600585938},{"name":"require merge-descriptors","ph":"X","pid":1,"ts":91388670738.616,"dur":1487.4210052490234},{"name":"require tty","ph":"X","pid":1,"ts":91388678217.915,"dur":1369.1600036621094},{"name":"require util","ph":"X","pid":1,"ts":91388679598.234,"dur":22.662002563476562},{"name":"require ms","ph":"X","pid":1,"ts":91388680994.364,"dur":1861.5559997558594},{"name":"require ./debug","ph":"X","
@bhr
bhr / Dockerfile
Created November 9, 2021 14:36
Kaniko Cache
FROM node:12-alpine AS base
# DEFAULT ARGS
ENV BASE_PATH=/base
ENV BUILD_PATH=/build
# CHECK TARGET APP PATH IS SET
ARG TARGET_APP_PATH
RUN test -n "$TARGET_APP_PATH" || (echo "TARGET_APP_PATH not set. Need to set TARGET_APP_PATH to the path of the project you're deploying" && false)
ENV TARGET_APP_PATH=${TARGET_APP_PATH}
@bhr
bhr / gcr-cleaner-setup.sh
Last active April 2, 2021 20:11
gcr-cleaner-setup
PROJECT_ID="<YOUR_PROJECT_ID>"
REPO_NAME="<YOUR_REPO_ID>"
CLOUD_RUN_REGION='europe-west1' #us-central1
APP_REGION='europe-west' #us-central
ARTIFACTS_REGION='eu' #leave empty for us
IMAGE_NAMES=("YOUR_IMAGE_1" "YOUR_IMAGE_2") # a list of image names
echo "Step 1: Enable Services"
gcloud services enable --project "${PROJECT_ID}" \
appengine.googleapis.com \
@bhr
bhr / data.json
Created October 18, 2020 11:09
Read data from json file
{
"status": "ok",
"totalResults": 38,
"articles": [
{
"source": {},
"author": null,
"title": "Blair approves request to boost RCMP presence as Nova Scotia lobster fishery dispute escalates - CBC.ca",
"description": "Public Safety Minister Bill Blair has greenlighted a request for additional RCMP support in Nova Scotia amid criticism that Ottawa has not done enough to protect community members embroiled in a bitter conflict over a First Nations lobster harvest in that pro…",
"url": "https://www.cbc.ca/news/politics/nova-scotia-fishery-conflict-rcmp-1.5766838",
@bhr
bhr / BHRCustomTitleView.h
Created March 12, 2015 17:05
Custom Title View for Navigation Bar
//
// BHRCustomTitleView.h
// NA
//
// Created by Benedikt Hirmer on 3/12/15.
// Copyright (c) 2015 HIRMER.me. All rights reserved.
//
#import <UIKit/UIKit.h>