Skip to content

Instantly share code, notes, and snippets.

View michaelgold's full-sized avatar

Michael Gold michaelgold

View GitHub Profile
@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;
@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 / 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 / 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 / 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 / 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 / tnp
Created September 11, 2017 14:21
Taskwarrior project report based on task
#!/bin/bash
# runs custom report named: ls
task sum pro:`task _get $1.project`
printf "\nPending Tasks: "
task ls pro:`task _get $1.project` status:pending
printf "\nWaiting Tasks: "
task ls pro:`task _get $1.project` status:waiting
printf "\nCompleted Tasks: "
task ls pro:`task _get $1.project` status:completed
@michaelgold
michaelgold / tap
Created September 14, 2017 00:32
Taskwarrior project report based on active tasks
#!/bin/bash
IFS=' ' read -r -a ids <<< "$(task +ACTIVE ids)"
for i in "${ids[@]}"
do
printf "\n\n\n\n\n$i - `task _get $i.description`\n"
/usr/local/bin/tnp $i
done
@michaelgold
michaelgold / ta
Created September 20, 2017 16:42
add taskwarrior task to project of parent task with parent task as a dependancy
#!/bin/bash
task=$1
args=""
for i in "${@:2}"
do args="$args $i"
done
task add pro:`task _get $task.project` dep:$task $args
@font-face {
font-family: 'Source Code Pro Powerline FontAwesome';
font-style: normal;
font-weight: normal;
src: local('Source Code Pro Powerline FontAwesome'), url('https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/patching-strategy/patched/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf') format('truetype');
}
body {
font-family: 'Source Code Pro Powerline FontAwesome' !important;
}