Skip to content

Instantly share code, notes, and snippets.

View displague's full-sized avatar
🐝
Mergin' 🎶 on a Sunday afternoon 🎶

Marques Johansson displague

🐝
Mergin' 🎶 on a Sunday afternoon 🎶
View GitHub Profile
#!/bin/bash
list_vrfs () {
echo -e "\nChoose an option:"
PS3=$'\n''Choose an option: '
options=("Show all VRFs" "Show VRFs in a specific metro" "Show specific VRF by UUID")
select opt in "${options[@]}"
do
case $opt in
@thebsdbox
thebsdbox / Tinkerbell on Equinixmetal.md
Last active January 23, 2023 14:22
Tinkerbell on Equinix Metal

The "perfect" virtual Tinkerbell environment on Equinix Metal

pre-requisites

This is a rough shopping list of skills/accounts that will be a benefit for this guide.

  • Equinix Metal portal account
  • GO experience (basic)
  • iptables usage (basic)
  • qemu usage (basic)
@thebsdbox
thebsdbox / bgp.go
Created August 27, 2020 13:43
This CLI will advertise a packet EIP through BGP
package main
import (
"context"
"flag"
"fmt"
"net"
"os"
"strconv"
"strings"
@asauber
asauber / docker_mac_free_space.sh
Last active May 21, 2020 16:42
Free up space used by Docker for Mac
#!/bin/bash
# Delete all unused image layers
docker system prune --all
# Delete all unused image layers non-interactive
docker system prune --all -f
# Run a container from Docker Inc. which cleans up the Virtual Machine
docker run --privileged --pid=host docker/desktop-reclaim-space
@displague
displague / README.md
Last active December 4, 2019 09:34
Linode APIv4 ID and Detail for Instance Types, Kernels, Regions, and Images

In response to https://github.com/terraform-providers/terraform-provider-linode/issues/7 , this gist offers a one-time static list of Linode Regions, Types, Images, and Kernels.

This list will go stale. Consider using the means discussed in that issue or use the Linode CLI to generate fresh results.

linode-cli --text regions list  | tr '\t' '|' > regions.md
linode-cli --text images list  | tr '\t' '|' > images.md
linode-cli --text kernels list  | tr '\t' '|' > kernels.md
linode-cli --text linodes types  | tr '\t' '|' > linode-types.md
@displague
displague / rancher_linode.md
Last active January 18, 2019 03:52
Trying Rancher on Linode

In this attempt, we will:

  1. Use Docker-Machine-Driver-Linode to provision a Linode with Docker-CE
  2. Run Rancher 2.x in that Docker-CE
  3. Install the Docker-Machine-Driver-Linode binary in Rancher
  4. Create a Template with the Necessary Settings
  5. Create a Rancher Kubernetes Cluster a. First Try Ubuntu (failure) b. Then Try CoreOS
  6. Next Steps
@ryboe
ryboe / .travis.yml
Last active September 16, 2024 07:47
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# You don't need to test on very old versions of the Go compiler. It's the user's
# responsibility to keep their compiler up to date.
go:
- 1.16.x
@displague
displague / querySome.cfm
Created February 7, 2017 20:00
QuerySome implementation for Adobe CF
<cfscript>
// return true if closure passes for any query row (supplied as a struct)
// based on http://cfdocs.org/querysome available in Lucee
boolean function QuerySome(required query q, required function f) {
for (var r in q) if (f(r)) return true;
return false;
}
</cfscript>
@MarcoWorms
MarcoWorms / mini-redux.js
Last active June 3, 2024 04:42
Redux in a nutshell
function createStore (reducers) {
var state = reducers()
const store = {
dispatch: (action) => {
state = reducers(state, action)
},
getState: () => {
return state
}
}
@displague
displague / gist:a00b1acbb95b9461a895
Last active November 19, 2017 19:59
push vagrant-linode gem
vi lib/vagrant-linode/version.rb
vi CHANGELOG.md
git commit -m 'version 0.1.2' lib/vagrant-linode/version.rb CHANGELOG.md
git tag -s v0.1.2 # -u E2D09AB6
git push --tags origin master
gem build vagrant-linode.gemspec
gem push vagrant-linode-0.1.2.gem