Skip to content

Instantly share code, notes, and snippets.

View Havoc24k's full-sized avatar

Thanasis Politis Havoc24k

View GitHub Profile
@Havoc24k
Havoc24k / waypoint.release.hcl
Created April 23, 2022 09:08
waypoint.release.hcl
release {
use "kubernetes" {
// Sets up a load balancer to access released application
load_balancer = false
ports = [
{ "port" = "50051", "target_port" = "50051" }
]
ingress "http" {
default = false
path = "/"
@Havoc24k
Havoc24k / waypoint.deploy.hcl
Created April 23, 2022 09:06
waypoint.deploy.hcl
deploy {
use "kubernetes" {
probe_path = "/healthz"
// Required for private container registry
// image_secret = "secretname"
pod {
container {
port {
@Havoc24k
Havoc24k / waypoint.build.hcl
Created April 23, 2022 09:05
waypoint.hcl build block
build {
use "pack" {}
registry {
use "docker" {
image = var.REGISTRY_URL
tag = "latest"
// Set to `true` if you don't want the image to be pushed to your container registry
local = false
@Havoc24k
Havoc24k / waypoint.hcl
Last active April 23, 2022 00:01
waypoint.hcl
variable "REGISTRY_URL" {
default = ""
type = string
description = "URL for your container registry."
}
variable "GRPS_URL" {
default = ""
type = string
description = "URL for your TLS enabled gRPC service endpoint."
@Havoc24k
Havoc24k / main.go
Last active April 22, 2022 21:43
main.go
// Package main implements a server for Greeter service.
package main
import (
"context"
"flag"
"fmt"
"log"
"net"
"net/http"
@Havoc24k
Havoc24k / efood_stats.py
Last active April 1, 2019 05:30
Get some basic statistical data to detect any irregularities on the ratings
"""
Efood ML.
Phase 1:
Collect data from efood comments
Future Phase 2:
Detect patterns on comments.
- Most common names
- Most common times the commnets are added
@Havoc24k
Havoc24k / create_ec2_ssh_config.py
Last active September 1, 2021 12:27
Python script to generate an SSH config file for EC2 instances
#!/usr/bin/python
"""AWS EC2 SSH config Generator."""
import boto3
import os
# The location and name of our generated config file
path_to_config = '/.ssh/aws_demo.config'
@Havoc24k
Havoc24k / sync.py
Last active September 29, 2023 08:55
Import tables from one PostgreSQL database to another using the INFORMATION_SCHEMA
#!/usr/bin/python3.6
"""Sync PostgreSQL."""
import psycopg2
import sys
from psycopg2.extras import RealDictCursor, execute_values
"""
Usage:

Keybase proof

I hereby claim:

  • I am havoc24k on github.
  • I am havoc24k (https://keybase.io/havoc24k) on keybase.
  • I have a public key ASC6JwfRh04qUNzmeNSSuS-b4KZemtT4V-neNVQIT_sKoQo

To claim this, I am signing this object:

@Havoc24k
Havoc24k / perfectelementary.bash
Created July 18, 2016 05:42
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'