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
# Identify nvme_drive | |
lsblk | |
# Mount the drive | |
sudo mkfs -t xfs /dev/nvme_drive | |
sudo mkdir /data | |
sudo mount /dev/nvme_drive /data | |
sudo chown ec2-user /data |
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
# Checkout a fresh copy of the repo you want to pull the code from | |
git clone [email protected]:wellcomecollection/scala-SOMELIB.git | |
# Move into the freshly checked repo | |
cd scala-SOMELIB | |
# Filter history for a particular directory | |
git filter-branch --subdirectory-filter SOMELIB -- --all | |
# Rearrange things as you'd like them |
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
#!/bin/bash | |
sudo yum update -y | |
# Setup docker | |
sudo amazon-linux-extras install docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
# Setup docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose |
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 python3 | |
""" | |
This script can be used to sync and confirm record sets between Route53 Hosted Zones. | |
""" | |
from pprint import pprint | |
import uuid | |
import boto3 | |
import click |
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
package things | |
import java.time.Instant | |
import com.sksamuel.avro4s.AvroSchema | |
import org.apache.avro.Schema | |
object World extends App { | |
sealed trait User { |
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
Flock flock; | |
void setup() { | |
size(800, 800); | |
flock = new Flock(); | |
// Add an initial set of boids into the system | |
for (int i = 0; i < 350; i++) { | |
flock.addBoid(new Boid(width/2,height/2)); | |
} | |
} |
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
float x,y,z,w,h,rotationX,rotationY; | |
int step; | |
void setup() { | |
size(800,800,P3D); | |
x = width/2; | |
y = height/2; | |
z = -100; |
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 | |
# ~/.azuresso | |
# | |
# { | |
# "AZURE_USER_ID": "user@domain" | |
# "AZURE_TENANT_ID" : "11111111-1111-1111-11111111111", | |
# "AZURE_APP_ID_URI" : "11111111-1111-1111-11111111111" | |
# } | |
# |
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
object ErrorStates { | |
// Type alias to string so it compiles | |
type Input = String | |
type Output = String | |
sealed trait ErrorState[Context] { | |
val err: Option[Throwable] | |
val ctx: Context | |
} |
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
import math | |
def _distance(x1, y1, x2, y2): | |
adj = x1 - x2 | |
opp = y1 - y2 | |
return math.sqrt(math.pow(adj,2) + math.pow(opp,2)) | |
def _angle(adj, opp): | |
#print(f"adj: {adj} ,opp: {opp}") |