- Are def lists
supported?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I'm not crazy about the current logic | |
//may want to shuffle things around a bit after it's known to work | |
var AWS = require('aws-sdk'); | |
var ecs = new AWS.ECS(); | |
var describeService = function(p) { | |
return ecs.describeServices({cluster: p.cluster, | |
services: [p.service]}).promise(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (mw-opts opts pages) | |
(define* (page page lst #:optional default?) | |
(define (budget! name sort help) | |
(gnc:register-option | |
opts (gnc:make-budget-option page name sort (N_ help)))) | |
(define (boolean! name sort help default) | |
(gnc:register-option | |
opts (gnc:make-simple-boolean-option page name sort (N_ help) default))) | |
(define (price-source! name sort cost) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hex_source = ["2", "4", "3", "F", "6", "A", "8", "8", "8", "5", "A", "3", "0", "8", "D", "3", "1", "3", "1", "9"], | |
decimal_digits = [], holding = []; | |
function pumpNextHex(source) { | |
var digit = parseInt(source.shift(),16), new_digits; | |
holding.push(digit); | |
// carry-over upward | |
for (var idx=holding.length-1; idx>0; idx--) { | |
if (holding[idx] > 9) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// current solution adapted from: https://gist.github.com/getify/e5ed084f122d73ac375b#gistcomment-1621271 | |
// | |
// Problem: | |
// | |
// given a stream of "hexadecimal digits" from PI, as in 0.243F6A8885A308D31319..., | |
// convert the stream digit-by-digit to base-10 decimal digits, as in: | |
// 0.1415926535897932384... | |
// | |
// Complications: | |
// because of floating point precision, the below current solution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Copyright 2013 Matt Whipple | |
//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 | |
//Unless required by applicable law or agreed to in writing, software | |
//distributed under the License is distributed on an "AS IS" BASIS, |