Skip to content

Instantly share code, notes, and snippets.

View ramene's full-sized avatar

Ramene Anthony ramene

View GitHub Profile
@ramene
ramene / openfaas-ngrok-kubernetes.md
Created July 4, 2019 17:16
OpenFaaS on Kubernetes

Quickly get OpenFaaS set up on your local machine with Kubernetes

  • Install Docker Community Edition (Edge): link
  • Install Helm:
    $ brew install kubernetes-helm
    
  • Create RBAC permissions for Tiller:

$ kubectl -n kube-system create sa tiller \

What

LinkedIn is a valuable resource, but sometimes it sucks. One of those times is when you want to delete messages. You have to select each message one by one. It takes about 4 "clicks" to successfully delete a message.

This script should help. Since LI requires you to perform multiple steps, I decided to automate it for you. Once you initiate the script, it will run every second. If a message has the ability to be deleted, it will be. If not, it will be archived. Some "InMail" messages cannot be deleted on the web app. This script should work as long as LI doesn't change their page layout or element names, which will happen eventually.

Last tested: Jan, 15, 2019

How

package main
import (
"database/sql"
"log"
"fmt"
"github.com/DATA-DOG/go-txdb"
"github.com/davecgh/go-spew/spew"
"github.com/pkg/errors"
@ramene
ramene / activitypub.txt
Created November 5, 2018 19:14
activitypub
NOTE! The ActivityPub spec now contains all the stuff from this tutorial
and some more! This is the old version. Check out the new version here:
https://www.w3.org/TR/activitypub/#Overview
ActivityPub tutorial
====================
ActivityPub is two things:
- *A server to server federation protocol*
@ramene
ramene / xcode-cmdline-tools.txt
Last active November 3, 2018 15:31
MacOS Mojave XCode Command Line Tools
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode Command Line Tools for Xcode 10.1
https://developer.apple.com/downloads/
As noted on SO, I was only able to successfully reinstall by downloading .DMG directly -
see: https://stackoverflow.com/questions/32893412/command-line-tools-not-working-os-x-el-capitan-sierra-high-sierra-mojave
@ramene
ramene / evicted.sh
Last active November 14, 2018 22:37
Evicted
kubectl get po -a --all-namespaces -o json | \
jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) |
"kubectl delete po \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: che
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
annotations:
# Enable PROXY protocol
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-configuration
namespace: che
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
data:
use-proxy-protocol: "true"
@ramene
ramene / README.md
Created September 4, 2018 03:16 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@ramene
ramene / Dockerfile
Created August 27, 2018 05:27
saws
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
jq \
groff \
python-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install saws