Skip to content

Instantly share code, notes, and snippets.

View ryanpedersen42's full-sized avatar
🦛

Ryan Pedersen ryanpedersen42

🦛
  • San Francisco, CA
View GitHub Profile
@ryanpedersen42
ryanpedersen42 / scalar.yaml
Last active March 22, 2022 15:09
Scalars and Chomp Modifiers Examples
# pipes and folded scalars
pipe: |
Farm boy, fill these with water
As you wish.
pipe_example: |
docker build -t $DOCKER_REPOSITORY:$TAG .
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin
docker push $DOCKER_REPOSITORY:$TAG
@ryanpedersen42
ryanpedersen42 / README.md
Created December 24, 2021 16:29
.direnv setup

Install and Configure

# install binary
curl -sfL https://direnv.net/install.sh | bash

# check path
ls /usr/local/bin | grep direnv
@ryanpedersen42
ryanpedersen42 / hobbit.yaml
Created September 30, 2021 08:07
YAML example
# Key / Value
book_name: The Hobbit
# Lists
bad_guys:
- goblins
- wargs
- Gollum
- Smaug
@ryanpedersen42
ryanpedersen42 / config.yml
Last active May 8, 2024 13:00
Path filtering example
version: 2.1
setup: true
orbs:
path-filtering: circleci/path-filtering@0.0.2
workflows:
setup-workflow:
jobs:
@ryanpedersen42
ryanpedersen42 / config.yml
Last active June 24, 2021 15:54
Run runner and cloud side-by-side
version: 2.1
workflows:
testing:
jobs:
- runner_mac
- runner_linux
- cloud_docker
jobs:
runner_linux:
machine: true
@ryanpedersen42
ryanpedersen42 / config.yml
Created February 23, 2021 14:22
Update base branch on PR
command: |
if [ -n ${CIRCLE_PR_NUMBER:-} ]; then
local base_branch=$(curl -fsSL https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r '.base.ref')
else
local base_branch=$CIRCLE_BRANCH
fi
@ryanpedersen42
ryanpedersen42 / config.yml
Last active July 2, 2020 16:51
Example command to split tests
# Step 1: Use the CircleCI CLI to split the tests with a globbing pattern to find test.js and exclude node_modules
# Step 2: Pipe list of tests in and split by timing data
# Step 3: Run tests as usual with the split test files being fed to the test runner
- run:
name: Test application w/ timing data
command: |
TEST=$(circleci tests glob **/{*test.js,!node_modules} | circleci tests split --split-by=timings)
yarn test $TEST
jobs:
test:
<executor removed for brevity>
# set the number of containers to split the tests across
parallelism: 2
steps:
<checkout steps removed for brevity>
# create directory to store test results
- run: mkdir ~/junit
@ryanpedersen42
ryanpedersen42 / package.json
Last active July 9, 2020 19:41
Testing Example
"jest": {
"reporters": [
"default",
"jest-junit"
],
},
"jest-junit": {
"addFileAttribute": "true"
},
"devDependencies": {
@ryanpedersen42
ryanpedersen42 / keybase.md
Created March 23, 2020 16:58
keybase identity

Keybase proof

I hereby claim:

  • I am ryanpedersen42 on github.
  • I am ryanpedersen42 (https://keybase.io/ryanpedersen42) on keybase.
  • I have a public key ASBe1-LXMKVyTLCu9gtxsyDCPLjr1n6cnjD3Sg6_lwo2sgo

To claim this, I am signing this object: