Skip to content

Instantly share code, notes, and snippets.

// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: check;
"use strict";
/**
* Widget to get a Todoist task based on a filter
* If a filter has multiple sections, will get a random task from first section that has tasks
* The script remembers last selected task, and keeps showing that task while it matches above
* condition (being part of first section with tasks).
@bumbu
bumbu / sensors.py
Created August 18, 2018 19:46
Temperature sensor that controls a relay
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
import sys
import Adafruit_DHT
RELAY_OFF = GPIO.LOW
RELAY_ON = GPIO.HIGH
@bumbu
bumbu / microsoft-flow-todoist-2.json
Created July 23, 2018 21:28
Microsoft flow for Todoist with dependent tasks
{
"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion":"1.0.0.0",
"parameters":{
"logicAppName":{
"type":"String",
"metadata":{
"description":"Name of the logic app."
}
},
@bumbu
bumbu / microsoft-flow-todoist.json
Created July 23, 2018 21:16
Microsoft flow for Todoist (changing the priority of next item in a project when a task is completed)
{
"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion":"1.0.0.0",
"parameters":{
"logicAppName":{
"type":"String",
"metadata":{
"description":"Name of the logic app."
}
},
@bumbu
bumbu / commit-msg.js
Created April 10, 2017 14:54
A script to prepend JIRA tag to the commit message based on branch name. Run from commit-msg git hook.
#!/usr/bin/env node
import * as fs from 'fs';
const JIRA_TAG = 'TAG';
/* If message title:
* * Doesn't start with square brackets []
* * Doesn't start with Merge branch
* * Doesn't start with Merge pull request
@bumbu
bumbu / onD3TransitionsEnd.js
Created September 20, 2015 14:42
A function for triggering a callback at the end of D3.js transitions
/*
Accepts one or more transitions and a callback as last argument
Example:
```
var transition1 = d3.selectAll('g').transition().duration(500)
, transition2 = d3.selectAll('circle').transition().duration(400)
, callback = function() {console.log('done')}
onD3TransitionsEnd(transition1, transition2, callback)
```
@bumbu
bumbu / gulpfile.coffee
Created February 26, 2015 10:37
Gulp stylus task
stylus = require 'gulp-stylus'
nib = require 'nib'
gulp.task 'development-style', ->
gulp.src './app/css/style.styl'
.pipe stylus
use: [nib()]
linenos: true
'include css': true
.pipe gulp.dest "./public/css"
@bumbu
bumbu / logs.txt
Created November 9, 2014 09:17
Selenium server standalone 2.44.0 debug logs when running intern 2.1.1with firefox
This file has been truncated, but you can view the full file.
Last login: Sun Nov 9 15:48:32 on ttys009
cd % ➜ kuende_front git:(master) ✗ cd ~/Development/Selenium
➜ Selenium java -jar selenium-server-standalone-2.42.2.jar
Nov 09, 2014 5:04:24 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
17:04:24.636 INFO - Java: Oracle Corporation 24.51-b03
17:04:24.637 INFO - OS: Mac OS X 10.10 x86_64
17:04:24.646 INFO - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
17:04:24.742 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: MAC
17:04:24.783 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444
@bumbu
bumbu / keybase.md
Created September 30, 2014 11:15
keybase.md

Keybase proof

I hereby claim:

  • I am bumbu on github.
  • I am bumbu (https://keybase.io/bumbu) on keybase.
  • I have a public key whose fingerprint is 1862 7E4B E09A 9C7A 4C59 DF3A 0CDE FA6F 1C55 E48F

To claim this, I am signing this object:

@bumbu
bumbu / child.js
Created May 17, 2014 20:18
Conditional module loading in bower
module.exports = function(a){
console.log('child got '+a)
}