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) |
require 'rubygems' | |
require 'pg' | |
require 'eventmachine' | |
module Subscriber | |
def initialize(pg) | |
@pg = pg | |
end | |
def notify_readable |
-- 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]$' |
with recursive breadcrumbs(id, parent_id, name) as ( | |
select id, parent_id, name | |
from pages | |
where id = 4 | |
union | |
select p.id, p.parent_id, p.name | |
from pages p | |
inner join breadcrumbs b on p.id = b.parent_id | |
) | |
select * from breadcrumbs; |
def fac(n: Int): BigInt = n match { | |
case 0 => 1 | |
case _ => n * fac(n - 1) | |
} | |
def facTail(n: Int, acc: BigInt = 1): BigInt = n match { | |
case 0 => acc | |
case _ => facTail(n - 1, n * acc) | |
} |
window.cookies = { | |
set: function(name, value, days) { | |
if (name) { | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | |
var expires = "; expires=" + date.toGMTString(); | |
} | |
else { | |
var expires = ""; |
I hereby claim:
To claim this, I am signing this object:
# Create the datadog user with select only permissions: | |
# CREATE USER datadog WITH PASSWORD '<complex_password>'; | |
# | |
# Grant select permissions on a table or view that you want to monitor: | |
# GRANT SELECT ON <schema>.<table> TO datadog; | |
# | |
# Grant permissions for a specific column on a table or view that you want to monitor: | |
# GRANT SELECT (id, name) ON <schema>.<table> TO datadog; | |
# | |
# Let non-superusers look at pg_stat_activity in a read-only fashon. |
create trigger trades_readonly_trigger before insert or update or delete or truncate on trades for each statement execute procedure readonly_trigger_function(); |
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, |