Skip to content

Instantly share code, notes, and snippets.

View emresaglam's full-sized avatar
🤪
Wut?

Emre Saglam emresaglam

🤪
Wut?
View GitHub Profile
@emresaglam
emresaglam / gist:a972d49a058eb7759264115658b1f791
Last active January 13, 2022 18:56
Kubernetes installation notes.

This is a fresh install to an Intel based computer. No VM, nothing. The goal is to have a single node kubernetes thing.

The Struggle and the installation

# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
@emresaglam
emresaglam / converter.py
Last active April 12, 2022 13:32
Heimdall to Homer migration script. (No error handling, etc...)
# MINI HOWTO
# 0. You will need PyYaml and BeautifulSoup python libraries. (Installation is up to you to figure it out)
# 1. Go to your heimdall page and save the html file. Note the file location.
# 2. Add the file location to heimdall_page variable.
# 3. Add the current homer yml file location as base_yaml variable.
# 4. Add your generated homer yaml file location to homer_config variable.
# 5. Define your icons folder. (Mine was in homer-icons/png)
import yaml
from yaml.loader import SafeLoader
from bs4 import BeautifulSoup as BS
@emresaglam
emresaglam / secscrape.py
Created June 10, 2021 20:54
Crude scraper for the security conferences page
import requests
import json
from bs4 import BeautifulSoup as bs
# The URL for the conf page
url = "https://infosec-conferences.com/"
r = requests.get(url)
r.text
# header needed as their nginx blocks other User Agents...
@emresaglam
emresaglam / ravers.py
Created May 29, 2021 20:49
Creates a number of random ASCII ravers
import random
def get_rnd(a):
import random
random_index = random.randint(0, len(a)-1)
return a[random_index]
heads = ['⊙', 'o', 'ö', 'O', '𑃰']
left_hands = ['\\', '|']
right_hands = ['/', '|']
@emresaglam
emresaglam / CheatSheet.md
Last active May 27, 2023 13:27
SMSGTE CheatSheet

SMSGTE Cheat Sheet

Sending Messages

APRS to SMS

To: SMSGTE
@<phone number> Message message message

Example:

@emresaglam
emresaglam / getdbsize.py
Created April 14, 2018 22:42
Script to poll the home assistant database running on PostgreSQL. The only requirement is psycopg2. (The script doesn't do any error/exception handling)
import psycopg2
# The name of the home assistant database
DB = "<DBNAME>"
# The user to connect to your home assistant database
DBUSER = "<DBUSER>"
# The IP/hostname of the PostgreSQL server
DBHOST = "<DBHOST>"
# The password for the user
DBPASSWORD = "<DBPASSWORD>"
@emresaglam
emresaglam / install_ss.yaml
Last active December 5, 2020 15:36
Somewhat smart automation script to install shadowsocks on major cloud providers (AWS, DigitalOcean, etc...)
#cloud-config
# Write a skeleton config file to be replaced by a random password
# Skeleton config file is:
#{
# "server_port":8000,
# "local_port":1080,
# "password":"__PASSWORD__",
# "timeout":600,
# "method":"chacha20"

Keybase proof

I hereby claim:

  • I am emresaglam on github.
  • I am emresaglam (https://keybase.io/emresaglam) on keybase.
  • I have a public key whose fingerprint is BF25 C594 9E5A EC3A 5E53 1714 C52C F4B2 A9C3 2E2E

To claim this, I am signing this object: