Skip to content

Instantly share code, notes, and snippets.

View michaelgold's full-sized avatar

Michael Gold michaelgold

View GitHub Profile
@michaelgold
michaelgold / task.c
Created September 6, 2017 15:17
Taskwarrior Windows 10 Wrapper for Ubuntu Bash
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Forked from https://bitbucket.org/kvorobyev/taskwarriorc2/issues/32/wrapper-for-task-install-in-windows
// Compile in bash with the command: x86_64-w64-mingw32-gcc task.c -o task.exe
char* concat(const char *s1, const char *s2)
{
char *result = malloc(strlen(s1)+strlen(s2)+1);
@michaelgold
michaelgold / 01-run.sh
Created April 7, 2016 14:50
docker hosted dokku
# add your public ssh keys to data/ssh
mkdir -p data/{apps,config,ssh,storage}
# build the image and tag it
docker build -t dokku/dokku:dokku-test .
# run the image
docker run \
-e "TRACE=1" \
-p "2222:22" \
@michaelgold
michaelgold / dokku_on_digital_ocean.md
Created April 6, 2016 01:16 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku
ssh henroku dokku config:get my-app
@michaelgold
michaelgold / gist:4e4fbc1a0006e6b06ddc
Last active August 29, 2015 14:24
GMail Snoozes for Mailbox
var MARK_UNREAD = true;
var ADD_UNSNOOZED_LABEL = true;
function do_setup() {
GmailApp.createLabel("[Mailbox]");
GmailApp.createLabel("[Mailbox]/Later Today");
GmailApp.createLabel("[Mailbox]/This Weekend");
GmailApp.createLabel("[Mailbox]/Tomorrow");
GmailApp.createLabel("[Mailbox]/Next Week");
GmailApp.createLabel("[Mailbox]/Next Month");
@michaelgold
michaelgold / SmartThings Insteon Hub
Last active January 1, 2022 11:51
SmartThings Insteon Hub Device Type
/**
* Insteon Switch (LOCAL)
*
* Copyright 2014 [email protected]
* Updated 1/4/15 by [email protected]
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
@michaelgold
michaelgold / gmailToOmnifocus.js
Last active December 11, 2015 16:38 — forked from al3xandru/gist:1169583
Gmail to Omnifocus Bookmarklet
javascript:(function(){
var enc=encodeURIComponent,
w=window,
frames=w.frames,
d=document,
tn=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),
pu=w.location.href,
isGMail=w.location.host.match(/mail\.google\.com/),
tt=pt=d.title,
subjSpans=d.getElementsByClassName("hP"),i,url;