Skip to content

Instantly share code, notes, and snippets.

View matheushent's full-sized avatar
💭
Building things and repeating

Matheus Tosta matheushent

💭
Building things and repeating
View GitHub Profile
@zulhfreelancer
zulhfreelancer / kubectl-apply-stdin.md
Last active March 22, 2024 14:17
How to run "kubectl apply -f" with inline YAML as stdin?
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF

OR

$ cat file.yaml | kubectl apply -f -
@gandroz
gandroz / buildspec.yml
Created April 9, 2020 02:19
buildspec yaml file
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
pre_build:
commands:
- apt-get install -y python3-venv
- python3.6 -m venv test_venv
@zhunhung
zhunhung / DockerFile
Created January 18, 2020 02:29
Selenium Linux DockerFile
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
# INSTALL DEPENDENCIES
RUN apt-get install -y curl unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
@rodydavis
rodydavis / flutter_github_ci.yml
Last active May 30, 2024 00:11
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@oursocks
oursocks / recaptcha-v3-solver.py
Created August 24, 2019 07:29
How to solve reCAPTCHA v3 using Python for Scraping the Easy Way (Using an OCR API)
import imagetyperzapi2
#... then go to the page using a webdriver object called driver
try:
driver.find_element_by_xpath("//*[@data-sitekey]")
captcha = True
except NoSuchElementException:
captcha = False
@vincent-zurczak
vincent-zurczak / compose-graylog.yml
Last active July 30, 2021 17:32
Centralized Logging in K8s with Fluent Bit and Graylog
# Based on https://hub.docker.com/r/graylog/graylog/
# Date: dec. 2018
version: '2'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongo:
image: mongo:3
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.1
@you359
you359 / GuidedBackpropagation.py
Created August 22, 2018 04:59
Guided-Backpropagation
import keras
from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import preprocess_input, decode_predictions
from keras.preprocessing import image
import keras.backend as K
import tensorflow as tf
from tensorflow.python.framework import ops
import numpy as np
@cablespaghetti
cablespaghetti / ecr-cred-updater.sh
Last active May 24, 2024 06:14
Automatic Updating Amazon ECR Credentials in Kubernetes
#!/bin/bash
# Get directory of script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ $# -ne 1 ]]
then
echo "ERROR: This script expects the namespace name to be given as an argument"
echo "e.g. ./ecr-cred-updater.sh my-namespace"
exit 1
@csabatini
csabatini / sqlalchemy_reflect.py
Created December 4, 2017 03:29
Auto-create models from an existing db with SQLAlchemy
from __future__ import print_function
from sqlalchemy import *
from sqlalchemy.orm import create_session
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
engine = \
create_engine("postgresql://...")
metadata = MetaData(bind=engine)
@hitvoice
hitvoice / plot_confusion_matrix.png
Last active February 21, 2024 19:51
Generate matrix plot for confusion matrix with pretty annotations.
plot_confusion_matrix.png