😶🌫️
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 pika | |
import logging | |
class Producer: | |
def __init__(self,host='localhost', exchanges=[], queues=[], conn_params=None): | |
self.queueNames = [ x.get('queue') for queue in queues ] | |
self.exchangeNames = [ x.get('exchange') for exchange in exchanges ] | |
if conn_params: | |
self.connection = pika.BlockingConnection(conn_params) |
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 main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
"os" | |
) | |
var folderToServe string |
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 apt update -y | |
sudo apt install docker docker.io | |
sudo systemctl start docker | |
sudo apt install curl apt-transport-https | |
sudo apt install virtualbox virtualbox-ext-pack | |
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | |
sudo cp minikube-linux-amd64 /usr/local/bin/minikube | |
sudo chmod 755 /usr/local/bin/minikube | |
minikube version |
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
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: nginx | |
spec: | |
replicas: 3 | |
selector: | |
app: nginx | |
template: | |
metadata: |
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
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
We've known each other for so long | |
Your heart's been aching, but you're too shy to say it |
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 | |
echo "npm/yarn?" | |
read pm | |
echo "Selected $pm" | |
read -r -d '' tsconfig << EOM | |
{ | |
"compilerOptions": { | |
"module": "commonjs", |
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 | |
python3 -m http.server & | |
./ngrok http 8000 |
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
CC = gcc | |
CFLAGS := $(shell sdl2-config --libs --cflags) -ggdb3 -O0 --std=c99 -Wall -lSDL2_image -lm | |
SRCS != find ./src -type f -name *.c | |
HEADS != find ./includes -type f -name *.h | |
OBJS := $(SRCS:.c=.o) | |
INCLUDES := -I ./includes |
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
pip install -r requirements.txt -t ./python | |
find -type d -name __pycache__ -exec rm -rf {} \; | |
zip lambda_layer.zip -r ./python/ |
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
FROM python:3-alpine | |
ENV PYTHONDONTWRITEBYTECODE=1 | |
ENV PYTHONUNBUFFERED=1 | |
ENV HOME=/home/app | |
ENV USER=app | |
ENV APP_HOME=/home/app/web | |
RUN addgroup -S app && adduser -S app -G app |
OlderNewer