Skip to content

Instantly share code, notes, and snippets.

View Kiougar's full-sized avatar

Georgios Tzourmpakis Kiougar

  • Amsterdam, Netherlands
View GitHub Profile
@Kiougar
Kiougar / geolite_download.py
Last active November 11, 2022 12:07
Downloads and extracts `GeoLite2-Country` and `GeoLite2-City` `mmdb` database files to the `./data` directory.
import io
import os
import tarfile
from urllib.request import urlopen
def get_url(name: str):
key = os.getenv('GEOLITE_LICENSE_KEY', '')
assert key, 'GEOLITE_LICENSE_KEY is missing'
return f'https://download.maxmind.com/app/geoip_download?edition_id={name}&license_key={key}&suffix=tar.gz'
@Kiougar
Kiougar / HOW_TO_AWS_STATIC_WEBSITE.md
Last active May 14, 2019 13:15
How to create and configure a static website on AWS
@Kiougar
Kiougar / certbot-to-keystore.sh
Last active September 11, 2023 09:21
Import certbot certificates to keystore files (used by glassfish server)
#!/bin/sh
#replace [##] with the correct value
#Alias of the certificate
NAME=[##]
#The current domain registered in letsencrypt
DOMAIN=[##]
#The keystore password, default is (changeit)
KEYSTOREPW=[##]
/*
Author:
Georgios Tzourmpakis <[email protected]>
Usage:
<div class="menu-trigger"><a class="menu-button [left-cross]"><span></span></a></div>
Demo: http://codepen.io/Kiougar/pen/QNQNNj
*/
@Kiougar
Kiougar / reset.scss
Last active March 2, 2016 08:35 — forked from HamptonMakes/reset.scss
Reset SCSS
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
@Kiougar
Kiougar / DBModel.java
Last active May 1, 2024 11:31
An abstract class for java Objects that are to be used as database models.
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
/**