I hereby claim:
- I am robertsosinski on github.
- I am sosinski (https://keybase.io/sosinski) on keybase.
- I have a public key ASAPxI5BFCvyApljKvTgZLqHO2P5ae6jaG_jncmP2EI1iQo
To claim this, I am signing this object:
// All potential actions that can be taken | |
let action = [ | |
'hit', // 0 | |
'stand', // 1 | |
'double', // 2 | |
'split', // 3 | |
'blackjack' // 4 | |
]; | |
// Used for hard hands, when the player hand does not have an Ace (11) |
-- 1. must be between 3 and 20 characters, | |
-- 2. must be only: | |
-- a. lowercase letters, | |
-- b. numbers, | |
-- c. individual dashes. | |
-- 3. must start with a letter, | |
-- 4. must not end with a dash. | |
'^[a-z]([-](?![-])|[a-z0-9]){1,18}[a-z0-9]$' |
I hereby claim:
To claim this, I am signing this object:
const aws = require("aws-sdk"); | |
const https = require("https"); | |
const url = require("url"); | |
// Sends a response to the pre-signed S3 URL | |
function sendResponse(event, context, callback, responseStatus, responseData) { | |
const responseBody = JSON.stringify({ | |
Status: responseStatus, | |
Reason: `See the details in CloudWatch Log Stream: ${context.logStreamName}`, | |
PhysicalResourceId: event.ResourceProperties.Name, |
with nums as ( | |
select * from (values (18), (3), (3), (2), (4), (2), (5), (3), (12), (0.00003), (4), (2)) as n (x) | |
), a as ( | |
select | |
stddev(nums.x) as sdev, | |
abs(avg(nums.x)) as aavg, | |
numrange( | |
(abs(avg(nums.x) - stddev(nums.x))), | |
(abs(avg(nums.x) + stddev(nums.x))) | |
) as bounds |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Configure Config Rules | |
Resources: | |
ConfigS3BucketPublicReadProhibitedRule: | |
Type: AWS::Config::ConfigRule | |
Properties: | |
ConfigRuleName: s3-bucket-public-read-prohibited | |
Description: Checks that your Amazon S3 buckets do not allow public read access. The rule checks the Block Public Access settings, the bucket policy, and the bucket access control list (ACL). | |
MaximumExecutionFrequency: TwentyFour_Hours |
let fs = require("fs"); | |
let path = require("path"); | |
let AWS = require("aws-sdk"); | |
let cliPath = path.resolve(process.env.HOME, ".aws", "cli"); | |
/* | |
NOTES: Make sure you alias the SHA1 fingerprinted cache token to the profile name | |
E.G. ln -s ~/.aws/cli/cache/09a19nczc3zvza58zrftetyfso7yw9d48u6ugsel.json profile |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetSSHPublicKey", | |
"iam:ListSSHPublicKeys" | |
], | |
"Resource": [ |
defmodule Dice do | |
def sum_probability(dice, target) do | |
prob = :math.pow(6, dice) |> round | |
total = 6 * dice | |
"#{sum_probability(dice, target, total)} / #{prob}" | |
end | |
defp sum_probability(dice, target, _total) when target < dice do | |
0 |
$odds = 0 | |
def sumProbability(dice, target) | |
if dice == 1 | |
"1 / 6" | |
else | |
prob = 6 ** dice | |
total = 6 * dice | |
if target < dice |