Skip to content

Instantly share code, notes, and snippets.

View kellyjandrews's full-sized avatar
I don't get it.

Kelly J Andrews kellyjandrews

I don't get it.
View GitHub Profile
@kellyjandrews
kellyjandrews / CreateVoiceApplication.md
Last active February 26, 2019 19:09
Nexmo Readme Boilerplate

Create a Voice Application

This application requires a Nexmo application and phone numbers. To create the application, use the nexmo app:create command with the Nexmo CLI.

The parameters are:

  • <<APP NAME>> - the name of the voice application
  • <<FILENAME>> - the name of the private key file, in this instance <<FILENAME>> is expected
  • <<ANSWER WEBHOOK>> - the webhook called the Nexmo number receives an inbound call
  • <<EVENT WEBHOOK>> - the webhook called when the call status changes
@F21
F21 / gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Last active October 23, 2022 12:36
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@exupero
exupero / README.md
Last active March 29, 2024 21:10
Alias a domain to a local port (Mac)

I run a lot of web servers for different projects, all of them on different ports. Generally I start with port 8000 and increment from there as I spin up new servers, but it became tiresome to remember what projects were running on which ports and what the next available port was.

/etc/hosts won't let you specify a port, but a combination of aliasing 127.0.0.1 to 127.0.0.X, forwarding ports from 8000 to 80, and adding the 127.0.0.X IP under an alias in /etc/hosts did work.

This script finds the next available value of X, aliases it with ifconfig, forwards the given port to port 80 with ipfw, and adds a new entry to /etc/hosts that aliases the IP to the domain you want.

Now I can add a server alias with sudo domain-alias funproject 8000, run the web server at 127.0.0.X:8000, and load up http://funproject/ in my browser.

(Because I needed it to work on a Mac, I couldn't use iptables. pfctl seems to work.)