Skip to content

Instantly share code, notes, and snippets.

Avatar

Cameron Moreau cameronmoreau

View GitHub Profile
View sendstat.json
{
"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
},
View quick-pricing.ts
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,
View gist:25366276e04d189e9d35ff0bdda4c016
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 Nov 25, 2020
Deploy React app to s3/cloudfront
View deploy-react-app.sh
#!/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
View CO_DENVER.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View test-buildy.patch
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" . ]]
View Networking-CodeSignal-08-22-2019.md

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
View om-error.txt
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:
View .json
{
"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",
View blah.json
{
"keys": [
{
"alg": "RS256",
"n": "vIs0vGoFJRWXRbPOwrbkAYtocuQbkHON9xUdC3Yp0Wyg1RXGnFjO4EZJWiWXlIRdMORW_ABEz8ggh5-51zdSZK4RES7OglD9TzoUvZgCwveI__wz2YvqvvZjelHixksHJn7dxBKd_qIB94A9JCtTTcX4tJExugBrZz5OpS9PoBeR4_cwHRk2618Q9CezhjBmOWEW5kyfDAhzJc8f6mpd1pX004e_OybD6xhfUHgnB0vT45ocFHmKzZ5LGfJyPxqXkLkpezofEC4lO5ru9yUhK209s7GABo39ZX6gYjHKocKeGxMRw2jZ_5jBK9-jcp9upqO7sgbfGpHjxZE6Pr6bsw",
"use": "sig",
"kid": "3782d3f0bc89008d9d2c01730f765cfb19d3b70e",
"e": "AQAB",
"kty": "RSA"
}