Skip to content

Instantly share code, notes, and snippets.

View techguydave's full-sized avatar

Dave techguydave

View GitHub Profile
@carbonin
carbonin / clean_manageiq.sh
Created November 6, 2017 20:39
Script to clean out the default setup of a ManageIQ appliance. This should make the appliance easier to configure in multi-server architectures.
#!/bin/bash
# Stop and disable services
systemctl stop evmserverd
systemctl disable evmserverd
systemctl stop $APPLIANCE_PG_SERVICE
systemctl disable $APPLIANCE_PG_SERVICE
# Remove auto-generated files
@jmb
jmb / README.md
Last active December 8, 2022 08:41
Google Calendar API v3 widget for Dashing

Description

Dashing widget to display the next and some subsequent Google Calendar events using the Google Calendar API v3.

I use this widget to display my shift calendar - see the screenshot below

Set up

This widget works with API v3 and requires a service account to be set up via the Google Developer's Console. Once a project is set up, enable the Calendar API. On the Credentials page create a new OpenID and download the p12 key file - set up the path to this file in the job file and grant the email address access to the relevant calendar.

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components