Skip to content

Instantly share code, notes, and snippets.

Avatar
🤪
Wut?

Emre Saglam emresaglam

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

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 Apr 12, 2022
Heimdall to Homer migration script. (No error handling, etc...)
View converter.py
# 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 Jun 10, 2021
Crude scraper for the security conferences page
View secscrape.py
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
Creates a number of random ASCII ravers
View ravers.py
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 Jul 5, 2020
SMSGTE CheatSheet
View CheatSheet.md

SMSGTE Cheat Sheet

Sending Messages

APRS to SMS

To: SMSGTE
@<phone number> Message message message

Example:

@emresaglam
emresaglam / getdbsize.py
Created Apr 14, 2018
Script to poll the home assistant database running on PostgreSQL. The only requirement is psycopg2. (The script doesn't do any error/exception handling)
View getdbsize.py
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 Dec 5, 2020
Somewhat smart automation script to install shadowsocks on major cloud providers (AWS, DigitalOcean, etc...)
View install_ss.yaml
#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"
View keybase.md

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: