Skip to content

Instantly share code, notes, and snippets.

View ruimartinsptl's full-sized avatar
💭
⏮⏪⏹⏸⏩⏭

Rui Martins ruimartinsptl

💭
⏮⏪⏹⏸⏩⏭
View GitHub Profile
const matrizInimigoGrande = [
[0,0],
[400,0],
[800,0],
[1200,0],
[1600,0],
[0,400],
[400,400],
[800,400],
[1200, 400],
@juunegreiros
juunegreiros / matrizInimigo.js
Created June 23, 2020 10:41
Matrizes Imersão GameDev Javascript
const matrizInimigo = [
[0, 0],
[104, 0],
[208, 0],
[312, 0],
[0, 104],
[104, 104],
[208, 104],
[312, 104],
[0, 208],
@florimondmanca
florimondmanca / README.md
Last active July 11, 2023 23:07 — forked from imbolc/httpx_aiohttp.py
HTTPX vs aiohttp (over HTTPS)

Usage

  • Generate TLS certificates for localhost:
pip install trustme-cli
trustme-cli
  • Run wrk on each endpoint, eg:
provider "azurerm" {
version = "= 1.42.0"
}
resource "azurerm_resource_group" "example" {
name = "aksgroup"
location = "West Europe"
}
@markshust
markshust / copyfolder.sh
Created August 30, 2018 02:20
copy folder from docker compose (named phpfpm) to local host
#!/bin/bash
[ -z "$1" ] && echo "Please specify a folder to copy (ex. vendor)" && exit
docker cp $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/$1 src/
kubectl get services # List all services
kubectl get pods # List all pods
kubectl get nodes -w # Watch nodes continuously
kubectl version # Get version information
kubectl cluster-info # Get cluster information
kubectl config view # Get the configuration
kubectl describe node <node> # Output information about a node
kubectl get pods # List the current pods
kubectl describe pod <name> # Describe pod <name>
kubectl get rc # List the replication controllers
@zparnold
zparnold / one_liner.sh
Last active March 20, 2024 06:27
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@npinto
npinto / cv2_detect.py
Created September 5, 2012 07:13
Simple face detection with OpenCV 'cv2' python bindings from 2.4.x
import cv2
import cv2.cv as cv
def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml',
scaleFactor=1.3, minNeighbors=4, minSize=(20, 20),
flags=cv.CV_HAAR_SCALE_IMAGE):
cascade = cv2.CascadeClassifier(cascade_fn)
rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor,
@kogakure
kogakure / .gitignore
Last active December 17, 2023 08:21
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst