Skip to content

Instantly share code, notes, and snippets.

View jamesholcomb's full-sized avatar

James Holcomb jamesholcomb

View GitHub Profile
@psxvoid
psxvoid / delete-evicted-pods-all-namespaces.sh
Created August 6, 2018 14:41
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@mattmattmatt
mattmattmatt / Pioneer VSX-824.md
Last active May 4, 2023 01:08
Control Pioneer amplifier VSX-824 remotely for home automation via Telnet on port 8102.

Telnet in:

telnet 192.168.1.128 8102 Use cmd + alt + 6 to stop transmission, q(uit) to exit telnet.

Telnet and exit:

telnet 192.168.1.128 8102 >> EOF
PO
EOF
@rcugut
rcugut / [GUIDE] macos yarn nvm install.md
Last active July 10, 2023 11:49
GUIDE for mac OS X yarn nvm node install

GUIDE to install yarn, nvm (node) on macOS

last update: Dec 4, 2020

Assumptions:

  • macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
  • homebrew properly installed
@dereknelson
dereknelson / alphabetizedList.js
Created March 29, 2018 18:03
Alphabetized List implementation
import React, { Component, } from 'react';
import { View, Text, TouchableOpacity, FlatList, ListItem, Image, TextInput, Dimensions,
Animated, StyleSheet, SectionList, PanResponder, PixelRatio, ScrollView } from 'react-native';
import sectionListGetItemLayout from 'react-native-section-list-get-item-layout'
var { height, width } = Dimensions.get('window')
/* this component is re-used between displaying the friends/groups and being able to pick them in metoo posts, so there are a few different if statements that
@hardbyte
hardbyte / Automated TLS certificates on k8s.md
Last active September 17, 2018 22:00
Free automated TLS certificates on k8s

Cross posted from blog.n1analytics.com

At N1 Analytics we use Kubernetes for running experiments, continuous integration testing and deployment. In this post I document setting up a Kubernetes cluster to automatically provision TLS certificates from Let's Encrypt using Jetstack's Certificate Manager, the helm package manager and the nginx-ingress controller.

I wrote this after migrating our cluster from traefik to use cert manager and nginx-ingress. The end state will be one where we can create Kubernetes ingress with a TLS certificate with only a set of annotations in the respective helm template.

I'm going to assume some background knowlege for this post, if you haven't heard of [Let's Encrypt](https://letsencrypt.org/abou

@infoslack
infoslack / cloudbuild.yaml
Last active November 13, 2018 00:44
example
steps:
# build steps
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/$PROJECT_ID/project:latest']
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '--cache-from', 'gcr.io/$PROJECT_ID/project:latest', '-t', 'gcr.io/$PROJECT_ID/projetc:latest', '-t', 'gcr.io/$PROJECT_ID/project', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'tag', 'gcr.io/$PROJECT_ID/project', 'gcr.io/$PROJECT_ID/project:stable-v-$TAG_NAME']
@Frizi
Frizi / build.sh
Last active November 12, 2018 22:53
gcloud cached docker build setup
#!/usr/bin/env bash
cd `dirname $0`/../..
set -e
IMAGE_NAME=eu.gcr.io/${PROJECT_ID}/${REPO_NAME}/$1
# Use multiple cache sources that make sense in given context.
# This setup is good for pull-request based CI, as most branches
# are based on master branch, each commit has a high chance
# to hit the cache of it's direct parent.
import React, {Component} from "react";
import {Animated, Dimensions, Platform, Text, View} from 'react-native';
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, Tabs, Title} from "native-base";
const NAVBAR_HEIGHT = 56;
const {width: SCREEN_WIDTH} = Dimensions.get("window");
const COLOR = "rgb(45,181,102)";
const TAB_PROPS = {
tabStyle: {width: SCREEN_WIDTH / 2, backgroundColor: COLOR},
activeTabStyle: {width: SCREEN_WIDTH / 2, backgroundColor: COLOR},
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod