I hereby claim:
- I am olange on github.
- I am olange (https://keybase.io/olange) on keybase.
- I have a public key ASBzFUPXlmMy_SpQTjo49LfCtBcPz1FcBbrH8pGTLPxWVgo
To claim this, I am signing this object:
Option Explicit | |
Private Const VERSION As String = "0.1" | |
Private Const DIALOG_TITLE As String = "yourModuleName › SendAllDrafts (v" & VERSION & ")" | |
' Name of the subfolder of the Drafts folder, containing the draft e-mails to be sent | |
Private Const MAILMERGE_SUBFOLDER_NAME = "MailMerge" | |
' Send all messages from the MAILMERGE_SUBFOLDER_NAME subfolder | |
' of the Drafts folder (ignores any subfolder) |
I hereby claim:
To claim this, I am signing this object:
/** | |
* List of executables in Cloud Functions runtime. | |
* Invoke with https://us-central1-‹project-name›.cloudfunctions.net/ls | |
*/ | |
const functions = require( "firebase-functions"); | |
const spawn = require( "child-process-promise").spawn; | |
const ls = (req, res) => { | |
console.log( "Listing contents of /usr/[local/][s]bin"); | |
return spawn( "ls", |
exp = module.exports = {} | |
url = require "url" | |
type = require "component-type" | |
graphql = require "graphql" | |
graphql_language = require "graphql/language" | |
graphql_error = require "graphql/error" | |
{ GraphQLScalarType } = graphql | |
{ GraphQLError } = graphql_error |
# | |
# A less-broken `typeof` function. CoffeeScript version of the | |
# `component/type` NPM package [1]. | |
# | |
# See also: | |
# | |
# [1] https://github.com/component/type/blob/master/index.js | |
# and https://gist.github.com/olange/2aa1abe1001c92bde78be1c84d7f1261 | |
exp.type = (val) -> | |
toString = Object.prototype.toString |
# | |
# Helper module to reliably find the types of Javascript objects | |
# and primitive values, easing polymorphic programming. | |
# | |
# See also: | |
# * http://javascript.info/tutorial/type-detection | |
# * https://gist.github.com/olange/514325f6fe3d89610d224d731a2def9e | |
exp = module.exports = {} | |
# |
;; User keymap | |
;; ----------------------------- | |
[ | |
[:editor "alt-w" :editor.watch.watch-selection] | |
[:editor "alt-shift-w" :editor.watch.unwatch] | |
[:app "pmeta-*" :workspace.show] | |
[:app "pmeta-/" :toggle-console] | |
[:app "pmeta-shift-/" :clear-console] | |
[:app "pmeta-alt-/" :console-tab] |
## | |
# Minimum number added to one that makes the result different than one | |
# | |
EPSILON = Number.EPSILON ? 2.2204460492503130808472633361816e-16 | |
## | |
# Given two floating point numbers and the maximum relative difference | |
# between the two, returns true if the two numbers are nearly equal, | |
# false otherwise. If the maximum relative difference (aka _epsilon_) | |
# is undefined, the function will test whether x and y are exactly equal. |
## | |
# Utility function to measure time intervals. Polymorphic return value: | |
# | |
# * returns either the current high-resolution real time, given no argument; | |
# * or the time elapsed since a given high-resolution real time, that was | |
# retrieved from a previous call to this function. | |
# | |
# Usage: | |
# t0 = hrtime() | |
# duration = hrtime( t0) # expressed in milliseconds |
## | |
# Given two sets A and B, returns a triple with the set of elements | |
# in A only, in both and in B only. | |
# | |
symmetricDiff = (setA, setB) -> | |
[inAOnly, inBoth, inBOnly] = [new Set(), new Set(), new Set()] | |
setA.forEach (eid) -> | |
(if setB.has( eid) then inBoth else inAOnly).add eid | |
setB.forEach (eid) -> | |
inBOnly.add( eid) unless inBoth.has( eid) |