Skip to content

Instantly share code, notes, and snippets.

View ffeldhaus's full-sized avatar

Florian Feldhaus ffeldhaus

View GitHub Profile
@ffeldhaus
ffeldhaus / pre_request.js
Last active August 29, 2022 07:35 — forked from dinvlad/pre_request.js
Auto-generate Google Access and ID tokens from a Service Account key and save it in Postman
/* This script auto-generates a Google OAuth token from a Service Account key,
* and stores that token in accessToken variable in Postman.
*
* Prior to invoking it, please paste the contents of the key JSON
* into serviceAccountKey variable in a Postman environment.
*
* Then, paste the script into the "Pre-request Script" section
* of a Postman request or collection.
*
* The script will cache and reuse the token until it's within
@ffeldhaus
ffeldhaus / oauth-authentication-powershell.ps1
Last active December 6, 2023 14:30
Using OAuth 2.0 with PowerShell to authenticate against Google Services
# configuration (adapt to your setup!)
$CertFile = "$HOME/certificate.p12"
$CertPassword = "notasecret"
$Project = "myproject"
$ServiceAccountName = "service-account"
$ServiceAccount = "$ServiceAccountName@$Project.iam.gserviceaccount.com"
$Scope = "https://www.googleapis.com/auth/cloud-platform"
$ExpirationSeconds = 3600
# import certificate
@ffeldhaus
ffeldhaus / automl-tables-retrieve-batch-prediction-results.ipynb
Last active May 19, 2020 11:43
AutoML Tables retrieve batch prediction results.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ffeldhaus
ffeldhaus / automl-tables-retrieve-model-information.ipynb
Created May 8, 2020 08:48
AutoML Tables retrieve model information.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ffeldhaus
ffeldhaus / Grafana-Dashboard-StorageGRID.json
Created November 24, 2017 18:29
Graphana Dashboard for NetApp StorageGRID
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@ffeldhaus
ffeldhaus / ds215j_bootstrap_ng.md
Last active September 26, 2023 11:09
Bootstrap Synology ds215j using optware-ng

Bootstrap the Synology DS215j with optware-ng

I tried the instructions described in the Blogpost Bootstrap DS215j to install optware for ds215j but was unsatisfied with the long outdated packages it provided. Luckily, there now is optware-ng which is a fork of optware and provides recent packages.

This is how I managed to install optware-ng on my Synology ds215j inspired by the instructions in the Gist Boostrap the Synology DS215j with optware, ipkg, and sudo:

Download & Install ipkg in a persistent manner

# become root

sudo -i

@ffeldhaus
ffeldhaus / gist:5013193
Created February 22, 2013 12:50
rOCCI adding a user defined mixin
scheme = 'http://myscheme#'
term = 'myterm'
title = 'mytitle'
attributes = Occi::Core::AttributeProperties.new
related = []
my_mixin = Occi::Core::Mixin.new scheme, term, title, attributes, related
# POST /-/
# Body: Rendering of the mixin
@ffeldhaus
ffeldhaus / gist:4197449
Created December 3, 2012 19:47
Script for measuring the duration of nova get-vnc-console
#!/bin/bash
# first parameter is the ID of a nova instance
# second parameter may be the amount of runs
count=${2:-100}
timefile=/tmp/vnctime.out
fmt="%e"
# mv out file to old
@ffeldhaus
ffeldhaus / gist:4018052
Created November 5, 2012 16:15
rOCCI parse text plain message
1.9.3p286 :001 > body=%Q|Category: storage;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"
1.9.3p286 :002"> Category: storage;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
1.9.3p286 :003"> X-OCCI-Attribute: occi.core.id="e7db6669-d819-5e20-a7ee-90be46591490"
1.9.3p286 :004"> X-OCCI-Attribute: occi.core.title="debian6"
1.9.3p286 :005"> X-OCCI-Attribute: occi.core.summary="Debian6 sample image"
1.9.3p286 :006"> X-OCCI-Attribute: occi.storage.state="online"
1.9.3p286 :007"> X-OCCI-Attribute: org.opennebula.storage.id="31"
1.9.3p286 :008"> X-OCCI-Attribute: org.opennebula.storage.type="OS"
1.9.3p286 :009"> X-OCCI-Attribute: org.opennebula.storage.dev_prefix="xvd"
1.9.3p286 :010"> X-OCCI-Attribute: org.opennebula.storage.bus="ide"
@ffeldhaus
ffeldhaus / gist:3861740
Created October 9, 2012 22:06
rOCCI awesomeness
irb -I lib/
1.9.3p194 :001 > require 'occi'
=> true
1.9.3p194 :002 > network=Occi::Core::Entity.new 'http://schemas.ogf.org/occi/infrastructure#network'
=> {
"kind": "http://schemas.ogf.org/occi/infrastructure#network"
}
1.9.3p194 :003 > network.class
=> Occi::Infrastructure::Network
1.9.3p194 :004 > network.class.superclass