Skip to content

Instantly share code, notes, and snippets.

View enriched's full-sized avatar

Rich Adams enriched

  • CIQ
  • Seattle, WA
View GitHub Profile
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active June 27, 2024 03:44
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
@enriched
enriched / in-pod-kubeconfig.sh
Last active July 6, 2024 10:42
Create kubeconfig inside pod
SERVICE_ACCOUNT_DIR="/var/run/secrets/kubernetes.io/serviceaccount"
KUBERNETES_SERVICE_SCHEME=$(case $KUBERNETES_SERVICE_PORT in 80|8080|8081) echo "http";; *) echo "https"; esac)
KUBERNETES_SERVER_URL="$KUBERNETES_SERVICE_SCHEME"://"$KUBERNETES_SERVICE_HOST":"$KUBERNETES_SERVICE_PORT"
KUBERNETES_CLUSTER_CA_FILE="$SERVICE_ACCOUNT_DIR"/ca.crt
KUBERNETES_NAMESPACE=$(cat "$SERVICE_ACCOUNT_DIR"/namespace)
KUBERNETES_USER_TOKEN=$(cat "$SERVICE_ACCOUNT_DIR"/token)
KUBERNETES_CONTEXT="inCluster"
mkdir -p "$HOME"/.kube
cat << EOF > "$HOME"/.kube/config
@walles
walles / bazel-generate-eclipse-project.sh
Last active February 22, 2022 12:34 — forked from enriched/bazel-generate-eclipse-project.sh
Generate Eclipse project for Bazel workspace (works with vscode-java)
#!/usr/bin/env bash
set -euo pipefail
cd "$(bazel info workspace)"
WORKSPACE_NAME=$(basename "$PWD")
cat << EOF > ./.project
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
@Zetten
Zetten / BUILD
Last active July 29, 2019 11:50
Bazel spring-boot jar
java_binary(
name = "spring_boot_packager",
srcs = ["src/SpringBootPackager.java"],
main_class = "src.SpringBootPackager",
visibility = ["//visibility:public"],
deps = ["//third_party/java:org_springframework_boot_spring_boot_loader_tools"],
)
@wolfgangmeyers
wolfgangmeyers / BUILD
Last active February 10, 2023 01:39
Eclipse setup script for bazel
java_binary(
name = "annotation_processors_ide",
create_executable = False,
runtime_deps = [
// annotation processor dependencies here
],
)
java_binary(
name = "project_deps",
@philipashlock
philipashlock / index.html
Last active March 15, 2021 10:39
ISO 8601 Date Validation
<html lang="en">
<head>
</head>
<body>
<pre>
<script type="text/javascript">
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git