Skip to content

Instantly share code, notes, and snippets.

View ashepherd's full-sized avatar

Adam Shepherd ashepherd

View GitHub Profile
@fils
fils / main.go
Last active July 28, 2018 00:49
A test to see if the google go-cloud package works with minio via the Amazon Go SDK
package main
import (
"context"
"flag"
"fmt"
"io/ioutil"
"log"
"github.com/aws/aws-sdk-go/aws"
@adamml
adamml / eg.json
Last active November 10, 2017 01:07
Casting a SKOS Concept to Schema.org
{
"@context": "http://schema.org",
"@type": "Thing",
"identifier": {
"@id": "http://vocab.nerc.ac.uk/collection/L05/current/134/",
"@type": ["PropertyValue", "CreativeWork"],
"name": "water temperature sensor",
"value": "water temperature sensor",
"description": "An instrument that measures the temperature of the water with which it is in contact.",
"alternateName": "",
#!/bin/sh
container=$1
pass=$2
if [ -z "$container" ] || [ -z "$pass" ]; then
echo "usage: $0 container newRootPassword"
exit
fi
mysql_image=$(docker inspect $container --format "{{ .Config.Image }}")
@joefutrelle
joefutrelle / MBVL bacteria vs diatom abundance prototype.ipynb
Created October 19, 2016 15:05
MBVL bacteria vs diatom abundance prototype
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@pheuter
pheuter / gist:3515945
Created August 29, 2012 17:33
Handlebars.js equality check in #if conditional

Handlebars.js is a template framework for Javascript environments. It allows the construction of HTML elements using HTML and expressions wrapped in {{ }}

Limitations of {{if}}

One of the conditional block helpers Handlebars offers is the {{#if}}.

For example:

<div class="entry">