Skip to content

Instantly share code, notes, and snippets.

View aejunior's full-sized avatar
🎯
Concentrando

Junior aejunior

🎯
Concentrando
View GitHub Profile
@raviolliii
raviolliii / thread_decorator.py
Last active February 17, 2024 13:37
Multithreading Decorator in python
from threading import Thread
def threaded(func):
"""
Decorator that multithreads the target function
with the given parameters. Returns the thread
created for the function
"""
def wrapper(*args, **kwargs):
@lvl99
lvl99 / date-iso-string-without-timezone.js
Created November 19, 2019 10:15
Date ISO string without timezone information
const controlDate = new Date();
controlDate.toString();
// -> "Thu Jun 20 2019 11:16:28 GMT+0200 (Central European Summer Time)"
controlDate.toDateString();
// -> "Thu Jun 20 2019"
controlDate.toUTCString();
// -> "Thu, 20 Jun 2019 09:15:28 GMT"
@zanculmarktum
zanculmarktum / megafetch.sh
Last active July 15, 2024 18:08
Get download url from mega.nz
#!/bin/bash
# Copyright 2018, 2019, 2020 Azure Zanculmarktum
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@h4
h4 / env.py
Last active June 20, 2024 13:00
Setup alembic to work properly with PostgreSQL schemas
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
from models import Base
config = context.config
fileConfig(config.config_file_name)