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
@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>
@ryboe
ryboe / .travis.yml
Last active June 11, 2025 03:12
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 / 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
@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
@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
@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"
@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)
#!/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