Skip to content

Instantly share code, notes, and snippets.

View daviesgeek's full-sized avatar
🧑‍💻

Matthew Davies daviesgeek

🧑‍💻
View GitHub Profile
@daviesgeek
daviesgeek / c8-scorecards-scriptable-widget.js
Last active November 14, 2023 17:58
Simple example of using configure8’s public api to build a Scriptable widget for iOS
const apiKey = "your_api_key";
const baseUrl = "https://app.configure8.io/public/v1/";
async function createWidget() {
// Create new empty ListWidget instance
let listwidget = new ListWidget();
listwidget.backgroundColor = new Color("#000");
let heading = listwidget.addText("Scorecard results");

split-polywave.sh

Use case

I have a RØDECaster Pro, which records a multitrack file in the polyWAV format. It's kind of a pain to work with in editors, so I wrote this simple little ffmpeg script to split out the tracks easily.

Known issue

Probably needs to check to make ffmpeg is installed Doesn't retain chapter markers from the original file

# !/bin/bash
####
#
# Gets the current Apple OS version number
# Pulls from https://support.apple.com/en-us/HT201222
# Usage: <script-path> [iOS|macOS|tvOS|watchOS]
#
# Example:
#

Keybase proof

I hereby claim:

  • I am daviesgeek on github.
  • I am daviesgeek (https://keybase.io/daviesgeek) on keybase.
  • I have a public key whose fingerprint is E70F A7E7 52DC 7B36 2500 75BE 3356 3A51 8074 1B33

To claim this, I am signing this object:

@daviesgeek
daviesgeek / README.md
Last active August 29, 2015 14:26
Angular: load controller from another controller

Simple example of loading a controller from another controller in Angular. Note that this returns a new instance of the controller.

Running example: http://plnkr.co/edit/EjzYj0

@daviesgeek
daviesgeek / Dockerfile
Created May 7, 2015 23:23
PHP/Apache image for Laravel
FROM php:5.6-apache
# Install modules
RUN apt-get update && apt-get install -y \
vim git \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install mcrypt mbstring zip pdo_mysql \
@daviesgeek
daviesgeek / ViewController.m
Last active August 29, 2015 14:18
WebViewJavascriptBridge callback
[bridge registerHandler:@"tapped" handler:^(id data, WVJBResponseCallback responseCallback) {
responseCallback([NSNumber numberWithBool:TRUE]);
}];
@daviesgeek
daviesgeek / README.md
Last active March 21, 2016 15:20
Angular $parse pass parameters

Super simple example using Angular's $parse service to pass parameters into a parsed function.

@daviesgeek
daviesgeek / parallax.css
Created September 9, 2014 16:53
Dead simple parallax scrolling
.parallax-bg {
position: absolute;
top: 0;
width: 100%;
}
@daviesgeek
daviesgeek / example
Created August 14, 2014 23:26
Javascript insert array into array
originalArray.splice.apply(originalArray, [indexToInsertAt, 0].concat(arrayToAdd))