I hereby claim:
- I am veelenga on github.
- I am veelenga (https://keybase.io/veelenga) on keybase.
- I have a public key ASAl1lYacwSZ5aZFFbB47_XcXvhZGX27uwSFRB3ikQ3Sqwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require "big/big_rational" | |
def root(n, acc = BigRational.new(2)) | |
base = ->(n : BigRational) { 2 + n.inv } | |
n.times { acc = base.call(acc) } | |
1 + acc.inv | |
end | |
puts (1..999).map { |n| root(n) }.map { |r| [r.numerator.digits.size, r.denominator.digits.size] }.count { |(n, d)| n > d } |
#!/usr/bin/env bash | |
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime which can be found at: | |
# https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html | |
# | |
# As of Jan 10, 2019, this is: | |
# Amazon Linux AMI 2017.03.1.20170812 x86_64 HVM GP2 (ami-4fffc834) | |
# | |
# Lambda includes ImageMagick 6.7.8-9 preinstalled, so you need to prepend PATH | |
# with the folder containing these binaries in your Lambda function to ensure |
const gm = require('gm').subClass({ imageMagick: true }); | |
const root = process.env['LAMBDA_TASK_ROOT']; | |
const path = process.env['PATH']; | |
const libPath = process.env['PATH']; | |
// change the Lambda Runtime to use pre-built binary | |
process.env['PATH'] = `${root}/bin:${path}`; | |
process.env['LD_LIBRARY_PATH'] = `${root}/lib:${libPath}`; |
tell application "BetterTouchTool" | |
activate | |
update_trigger "EAE52DEC-26DA-40DC-8BB1-62A102FE676C" json "{\"BTTEnabled\" : %d}" | |
update_trigger "7C3BC3BC-2B93-4674-8A5F-6697FDC6E723" json "{\"BTTEnabled\" : %d}" | |
end tell |
require "ameba" | |
source = Ameba::Source.new %( | |
class Ameba::Internals | |
getter info : Info | |
def dump | |
puts info | |
end | |
end |