stateDiagram-v2
direction TB
state "Commit on feature branch" as FeatureCommit
state "Merge to main" as MergeToMain
state "Author & reviewer review published screenshots" as ReviewSS
state "Storyshots CI Step Triggered" as TriggerCI
state "Publish feature<>main diff on GH Pages" as PublishDiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Method: Go through the "Code Quality Check" workflow and sample all the builds across pages | |
# https://github.com/SironaMedical/services-frontend/actions/workflows/pull-request.yml?query=is%3Asuccess | |
# Build caching PR: https://github.com/SironaMedical/services-frontend/pull/3915 | |
# Merged Dec 18, 2023 | |
# Old, pre-optimization GHA run IDs from 12/11/2023 to 12/14/2023 | |
old_runs=( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const offerButtons = document.querySelectorAll('.offer-cta[title="Add to Card"]'); | |
const sz = offerButtons.length - 1 | |
const shouldContinue = confirm(`Found ${sz} available offers, continue?`) | |
if(shouldContinue === true) { | |
for (let i = 0; i < sz; ++i) { | |
console.log(`Accepting offer ${i + 1} of ${sz - 1}`); | |
offerButtons[i].click(); | |
await new Promise(r => setTimeout(r, 3000)); | |
} | |
alert("Done!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use with the following AWS AMI: | |
# Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-79873901 | |
# Install dependencies | |
sudo apt-get -y update | |
sudo apt-get -y install expat | |
sudo apt-get -y install libexpat1-dev | |
sudo apt-get -y install libboost-dev | |
sudo apt-get -y install libboost-program-options-dev | |
sudo apt-get -y install postgresql postgresql-contrib |
April 28, 2017 @ Mode Analytics
- Hadoop is a combination of three projects
- HDFS is the Hadoop data storage/file system that stores the data
- MapReduce/batch processing framework -- open-sourced from MapReduce
- YARN (yet another resource negotiator) - resource management
- Spark takes advantage of processessing through memory instead of saving to disk (Hadoop)
I hereby claim:
- I am danyim on github.
- I am danyim (https://keybase.io/danyim) on keybase.
- I have a public key ASD7spy20tjEuvjI5bdxJPP_aJhqW7JUzNpKBARTSGu9yAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The first 12 digits of pi are 314159265358. We can make these digits into an | |
expression evaluating to 27182 (first 5 digits of e) as follows: | |
3141 * 5 / 9 * 26 / 5 * 3 - 5 * 8 = 27182 | |
or | |
3 + 1 - 415 * 92 + 65358 = 27182 | |
Notice that the order of the input digits is not changed. Operators (+,-,/, | |
or *) are simply inserted to create the expression. |
- Problem: Given a stream of integers, you should be able to provide the median at any given time..
- Ex. input: [2, 8, 5, 3, 4, 2, .. ]
- Output (medians at i): [2, 2, 5, 3, 4, 3, 3]
- Ex. input: [2, 8, 5, 3, 4, 2, .. ]
- Assumption: if you have an even number of values, the lower value is the median
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/{{ YOUR SQS }}/bbs-sqs'; | |
var NUM_MSGS_TO_PULL = 1; | |
var AWS = require('aws-sdk'); | |
var sqs = new AWS.SQS({region : 'us-east-1'}); | |
exports.handler = function(event, context) { | |
var recvParams = { | |
QueueUrl: QUEUE_URL, | |
MaxNumberOfMessages: NUM_MSGS_TO_PULL | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "http://localhost:9200/personsearch" | |
curl -XPUT "http://localhost:9200/personsearch" -d' | |
{ | |
"settings": { | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"idx_analyzer": { | |
"tokenizer": "CommaTokenizer", | |
"filter": [ |