Skip to content

Instantly share code, notes, and snippets.

View cameronmoreau's full-sized avatar

Cameron Moreau cameronmoreau

View GitHub Profile
{
"data": {
"name": "AUTOMATED TESTING - Message Steps - Variant First Step",
"total_stats": {
"revenue": 0.0,
"entries": 20,
"exit_criteria_evictions": 0,
"conversions": 1,
"conversions_by_entry_time": 1
},
@cameronmoreau
cameronmoreau / quick-pricing.ts
Created January 15, 2021 00:30
Used for Gozova WWW
const HOUSEHOLD = {
"650_sqft_apt": 390,
"1300_sqft_townhouse": 780,
"2000_sqft_house": 1200,
};
const ITEMS = {
queen_mattress: 30,
queen_bed_Frame: 45,
"4seat_dining_table": 30,
it("checks for schedule conflicts", () => {
const crewInfo = {
crews: [
{
id: 2,
vehicle: "pickup_truck",
schedule: [
{
start_hour: 8,
end_hour: 13,
@cameronmoreau
cameronmoreau / deploy-react-app.sh
Created November 25, 2020 17:42
Deploy React app to s3/cloudfront
#!/bin/bash
if [ "$1" == "staging" ]; then
NODE_ENV="staging"
ENV="staging"
S3_URL="s3://your-staging-bucket"
CLOUDFRONT_ID="XXX-STAGING-ID"
echo "[🔨 Deploy] Building project"
npm run build:staging
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/templates/pipeline/node/pipeline/pipeline.template.yml b/templates/pipeline/node/pipeline/pipeline.template.yml
index cfa9704..faf5fd3 100644
--- a/templates/pipeline/node/pipeline/pipeline.template.yml
+++ b/templates/pipeline/node/pipeline/pipeline.template.yml
@@ -3,6 +3,7 @@ resource_types:
[[ template "resource-type-helm" . ]]
resources:
+[[ template "resource-buildy" . ]]
[[ template "resource-app" . ]]

Lucky Numbers

Ticket numbers usually consist of an even number of digits. A ticket number is considered lucky if the sum of the first half of the digits is equal to the sum of the second half.

Given a ticket number n, determine if it's lucky or not.

Example:

For n = 1230, the output should be
isLucky(n) = true;
For n = 239017, the output should be
Task 216 | 22:56:15 | Preparing deployment: Preparing deployment (00:00:14) │
Task 216 | 22:56:29 | Preparing deployment: Rendering templates (00:00:44) │
L Error: Unable to render instance groups for deployment. Errors are: │
- Unable to render jobs for instance group 'control'. Errors are: │
- Unable to render templates for job 'cloud_controller_ng'. Errors are: │
- Error filling in template 'cloud_controller_ng.yml.erb' (line 42: Error for database_encryption: 0 were marked active. Only one key may be active) │
- Unable to render templates for job 'cloud_controller_clock'. Errors are:
@cameronmoreau
cameronmoreau / .json
Created April 23, 2019 17:30
well-knowns
{
"issuer": "https://uaa.run.pivotal.io/oauth/token",
"authorization_endpoint": "https://login.run.pivotal.io/oauth/authorize",
"token_endpoint": "https://login.run.pivotal.io/oauth/token",
"token_endpoint_auth_methods_supported": [
"client_secret_basic",
"client_secret_post"
],
"token_endpoint_auth_signing_alg_values_supported": [
"RS256",
{
"keys": [
{
"alg": "RS256",
"n": "vIs0vGoFJRWXRbPOwrbkAYtocuQbkHON9xUdC3Yp0Wyg1RXGnFjO4EZJWiWXlIRdMORW_ABEz8ggh5-51zdSZK4RES7OglD9TzoUvZgCwveI__wz2YvqvvZjelHixksHJn7dxBKd_qIB94A9JCtTTcX4tJExugBrZz5OpS9PoBeR4_cwHRk2618Q9CezhjBmOWEW5kyfDAhzJc8f6mpd1pX004e_OybD6xhfUHgnB0vT45ocFHmKzZ5LGfJyPxqXkLkpezofEC4lO5ru9yUhK209s7GABo39ZX6gYjHKocKeGxMRw2jZ_5jBK9-jcp9upqO7sgbfGpHjxZE6Pr6bsw",
"use": "sig",
"kid": "3782d3f0bc89008d9d2c01730f765cfb19d3b70e",
"e": "AQAB",
"kty": "RSA"
}