Skip to content

Instantly share code, notes, and snippets.

View lucymhdavies's full-sized avatar
🍓
Strawb System

Lucy Davinhart || Strawb System lucymhdavies

🍓
Strawb System
View GitHub Profile
@njoerd114
njoerd114 / README.MD
Last active March 4, 2024 11:20
Sankey Diagram with Google Spreadsheets

Sankey Diagrams within Google Spreadsheets

This Gist is there to help you creating a Sankey Diagram from your Google Spreadsheets.

Installation

  • Open a spreadsheet
  • Click "Tools" -> "Scripts"
@Deleplace
Deleplace / signdance.go
Last active January 26, 2019 20:28
Source code for a sample Google Cloud Function
# Copyright 2019 Google LLC
# SPDX-License-Identifier: Apache-2.0
package p
import (
"fmt"
"image"
"image/color"
"image/draw"
"image/gif"
@wheresalice
wheresalice / backup.sh
Last active January 8, 2019 15:37
Backup your github repos to Bitbucket
# Usage: change username:password to either an app-password or your actual password
# Change WheresAlice to your actual username on Bitbucket.org
# Run this script from the directory with all your GitHub checkouts in
# @TODO - Due to Mac limitations of 'find' we are listing all files, not just directories
# @TODO - Get a list of GitHub repos and clone them all
# @TODO - Do this for GitLab too
# Replace my_token with a token from https://github.com/settings/tokens and then uncomment this line in order to clone the first 100 of your github repositories
# curl 'https://api.github.com/user/repos?access_token=my_token&affiliation=owner&per_page=100' | gron | grep ssh_url | cut -d'"' -f2 | xargs -I {} git clone {}
@daniilyar-confyrm
daniilyar-confyrm / check_cpu_credits.sh
Last active May 17, 2023 08:34
[Nagios-check] AWS EC2 - check how much CPU credits are left at the instance
#!/bin/bash
set -e
OK=0
WARN=1
CRIT=2
UNKNOWN=3
function get_warning_limit {
master:
image: rancher/server
container_name: master
volumes_from:
- mysql
ports:
- "8080:8080"
links:
- mysql
environment:
@rb2k
rb2k / gist:8372402
Last active April 15, 2024 19:30
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {