This file contains hidden or 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
from adafruit_circuitplayground import cp | |
import time | |
import random | |
# Initialize variables globally at the top of the file | |
last_press_time_player1 = None | |
last_press_time_player2 = None | |
# Define color constants | |
RED = (255, 0, 0) |
This file contains hidden or 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
FROM --platform=linux/amd64 debian:bookworm | |
WORKDIR /app | |
RUN apt update \ | |
&& apt dist-upgrade -y \ | |
&& apt autoremove -y \ | |
&& apt install -y -q \ | |
build-essential \ | |
subversion \ | |
wget \ |
This file contains hidden or 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
FROM --platform=linux/amd64 debian:bullseye | |
WORKDIR /app | |
RUN apt update \ | |
&& apt dist-upgrade -y \ | |
&& apt autoremove -y \ | |
&& apt install -y -q \ | |
build-essential \ | |
subversion \ | |
wget \ |
This file contains hidden or 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
packer { | |
required_plugins { | |
docker = { | |
version = ">= 1.2.6" | |
source = "github.com/hashicorp/amazon" | |
} | |
} | |
} | |
locals { |
This file contains hidden or 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 | |
set -e | |
set -x | |
cloud-init status --wait | |
sudo cat /etc/lsb-release | |
uname -a | |
sudo apt-get update && \ |
This file contains hidden or 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 | |
### inserts all CIDRs into a new security group. | |
### Doesn't set correct protocol or the description ... but at least it makes the data entry a bit quicker since you can't copy/pasta in the EC2 UI easily. | |
SOURCE_REGION=us-west-1 | |
SOURCE_PROFILE=default | |
SOURCE_SG_ID=sg-id-goes-here | |
DESTINATION_REGION=us-east-2 | |
DESTINATION_PROFILE=default |
This file contains hidden or 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
return this.cachedOfferResponseRepository.findCachedOfferResponseBySellerIdEqualsAndProductIdEquals(CLIENT_ID.toString(), gtin) | |
.flatMapIterable(CachedProductOfferResponse::getOffers) | |
.switchIfEmpty(this.requestAndCache(gtin)); |
This file contains hidden or 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 com.example.identity.config; | |
import com.example.identity.model.User; | |
import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; | |
import org.springframework.security.oauth2.common.OAuth2AccessToken; | |
import org.springframework.security.oauth2.provider.OAuth2Authentication; | |
import org.springframework.security.oauth2.provider.token.TokenEnhancer; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains hidden or 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 | |
#set -x | |
GITHUB_ACCESS_TOKEN=TOKEN_GOES_HERE | |
GITHUB_USERNAME=USERNAME_GOES_HERE | |
GITHUB_ORGANIZATION=com.example | |
GITHUB_REPOSITORY=microservice | |
## Jenkins project name | |
PROJECT="com.example.microservice" | |
function clean_closed_prs { |
This file contains hidden or 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 | |
## Given env.js that looks something like | |
# | |
# const env = { | |
# application_env : '~REACT_ENV_REPLACE_JS_APPLICATION_ENV~', | |
# }; | |
# module.exports = env; | |
# And an environment variable of JS_APPLICATION_ENV=whateverItOughtToBe ... replace any occurrences on runtime (add to docker CMD) | |
# |
NewerOlder