Skip to content

Instantly share code, notes, and snippets.

View cjwilburn's full-sized avatar
👩‍🚀
planet earth is blue/and there's nothing i can do

Courtney Wilburn cjwilburn

👩‍🚀
planet earth is blue/and there's nothing i can do
View GitHub Profile
@sbinlondon
sbinlondon / synthwaveglow.md
Last active October 12, 2024 17:10
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

config:
target: "https://example.com"
phases:
- duration: 300
arrivalRate: 25
name: "Warming up"
- duration: 300
rampTo: 50
name: "Little caress"
- duration: 300
@codysmith287
codysmith287 / get.yml
Last active May 20, 2020 22:09
Get Requests Stress Test for Proxy Server
config:
target: 'http://localhost:3000'
http:
pool: 20
phases:
- duration: 10
arrivalRate: 1
rampTo: 10
name: "1 to 10 request per second"
- duration: 30
---
# Copyright 2018 widdix GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@adhorn
adhorn / get.py
Created January 28, 2019 17:19
lambda function used to demo ALB to Lambda integration
from __future__ import unicode_literals
import sys
import logging
import boto3
import os
log = logging.getLogger()
log.setLevel(logging.DEBUG)
sys.path.insert(0, './vendor')
@whitehorse0
whitehorse0 / artillery-config.test.yaml
Last active February 21, 2024 18:59
Artillery configuration example Load testing, and allow writing custom logic JS functions to be called at certain points during the execution of a scenario.
config:
target: "http://localhost:8000"
http:
timeout: 10 # Responses have to be sent within 10 seconds or the request will be aborted
processor: "./processor.js"
phases:
# Create 100 virtual users every second for 60 seconds
- duration: 60 # seconds
arrivalRate: 100 # virtual users
# Create the ALB
resource "aws_alb" "nexus_alb" {
name = "nexus-alb"
internal = true
load_balancer_type = "application"
security_groups = ["${aws_security_group.alb.id}"]
subnets = ["${data.aws_subnet_ids.nexus_vpc_subnets.ids}"]
access_logs {
bucket = "${aws_s3_bucket.nexus-s3-bucket-logs.bucket}"
@amanjeev
amanjeev / aws-alb-asg.tf
Created October 7, 2018 04:24
AWS Auto Scaling Group with Application Load Balancer using Terraform
# Create a basic ALB
resource "aws_alb" "my-app-alb" {
name = "my-app-alb"
}
# Create target groups with one health check per group
resource "aws_alb_target_group" "target-group-1" {
name = "target-group-1"
port = 80
protocol = "HTTP"
import boto3
import sys
from datetime import datetime, timedelta, date
import json
# import jenkins
import base64
import spotinst_sdk
import time
import re

So, as I mentioned last time, I have two fundamental goals with dat that are not addressed by simply running dat share.

  • Uptime: making sure that the site is seeded even if my local laptop is closed, eaten by a bear, or disconnected from the internet
  • Resilience: ensuring that there's a way to restart my website if the original seeding computer is lost. I try to make everything on my primary work/personal computer work in such a way that I can recover it all, easily, onto a new machine if I need to

To break these down a bit more, uptime is a combination of two things:

  • Ensuring that there are seeders
  • Ensuring that those seeders are seeding, and they're up-to-date