Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
at the keebs

Brandon Philips philips

👨‍💻
at the keebs
View GitHub Profile
@philips
philips / obsidian-web-clipper.js
Created Sep 15, 2021 — forked from kepano/obsidian-web-clipper.js
Obsidian Bookmarklet to clip pages
View obsidian-web-clipper.js
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
View prometheus.yml
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: prometheus-deployment
name: prometheus
spec:
replicas: 1
template:
@philips
philips / users.md
Last active Jan 28, 2021
Kubernetes Third-Party Resource Users
View users.md
@philips
philips / user-data
Last active Sep 16, 2020
Running consul on top of CoreOS utilizing etcd for automatic bootstrapping.
View user-data
#!/bin/bash
source /etc/environment
name=$(cat /etc/machine-id)
if [ ! -f /opt/consul ]; then
mkdir /opt
mkdir /var/lib/consul
curl http://storage.googleapis.com/ifup-org-tilde/consul-0.2.0-linux-x86-64.lzma | lzcat > /opt/consul
chmod +x /opt/consul
@philips
philips / gist:03565438faa2b082ac2f4cabb8d3853b
Last active Apr 25, 2019
CNCF May Governing Board meeting
View gist:03565438faa2b082ac2f4cabb8d3853b

Hello CNCF Project Maintainers,

Michelle Noorali and I represent developers working on CNCF projects to the CNCF governing board (GB). The next GB meeting is May 20th in Barcelona; Michelle will be attending.

If you have any business that you would like us to raise at this meeting please email us off list or file an issue. The deadline is May 13th so there is time to prepare.

Since our last meeting Michelle and I have worked on a number of topics:

View ping.txt

This has been happening to me for the last two weeks or more. We regularly streamed a brown noise track to our Chromecast for the last 4 months for our daughter. Now it no longer works from my wifes phone or my phone. It was skipping when I tested at 735am 20180519. No other services have this issue with Chromecast only Spotify. Regularly using Youtube Pulsar Netflix HBO and Google Play. Pixel 1 phone Android 4.171019.016.B1, Spotify 8.4.53.703, Pixel 2 phone Android 4.171019.016.B1, Spotify 8.4.53.703, Chromecast audio 1.31.114510, Google home mini 1.31.114510, Spotify Premium family accounts

View gist:1b97028fe9bd3c096d2198c929e44331

Running a local Kubernetes API server on a local workstation based on an etcd snapshot can be useful for debugging, and understanding database backups. In a few simple steps this can be accomplished on Windows, Linux, or OSX.

First, gather up a backup of the etcd data directory. Generally this file is stored in /var/etcd or /var/lib/etcd or a backup server. Inside of this directory is a file called member/snap/db which can be used to generate a new data-dir that can run locally.

$ ETCDCTL_API=3 etcdctl snapshot restore kube-system-kube-etcd-0000/member/snap/db --name m1 --initial-cluster m1=http://localhost:2380 --initial-cluster-token etcd-cluster-1 --initial-advertise-peer-urls http://localhost:2380 --skip-hash-check

Now, run etcd against the generated data directory

View coreos-hiring-eng-prod-mgmt-and-writers.md

CoreOS continues to build and introduce projects, products, and teams that make customers successful with Kubernetes. Join us through this next phase of growth of the company as we continue our mission to secure the internet through rapid adoption of an enterprise ready Kubernetes we call CoreOS Tectonic.

https://coreos.com/careers

Positions are available in a variety of locations. Project

Highlighted roles below; additional roles in Sales, Project Management, IT, Marketing, and Customer Success.

Engineering: Berlin, SFO, or remote

@philips
philips / gist:04199c1647670eb451af2c2686a91b8a
Created May 12, 2017
machine parseable Terraform plan
View gist:04199c1647670eb451af2c2686a91b8a
$ export TERRAFORM_CONFIG=.terraformrc; $HOME/Downloads/tectonic/tectonic-installer/darwin/terraform plan -var-file terraform.tfvars -out bar -state terraform.tfstate ./platforms/aws
$ go get github.com/philips/tfjson
$ tfjson bar
{
...secrets and stuff...
"vpc": {
"destroy": false
},
"workers": {
"aws_autoscaling_group.workers": {
@philips
philips / gist:7310435
Last active Mar 17, 2017
Setting up swap on coreos
View gist:7310435

Setup a swap file in the stateful partition

Run these commands as root to create a 512 megabyte swap.

fallocate -l 512m /media/state/512MiB.swap
chmod 600 /media/state/512MiB.swap
mkswap /media/state/512MiB.swap