Skip to content

Instantly share code, notes, and snippets.

View d0x1n's full-sized avatar
🚀
Loading…

Đorin d0x1n

🚀
Loading…
View GitHub Profile
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active October 15, 2025 20:30
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@Mastytch
Mastytch / gist:e8e89ac25115970aff0be94cf4a379ba
Last active July 24, 2020 19:30
codingame Java A power of Thor
import java.util.*;
import java.io.*;
import java.math.*;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
* ---
* Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders.
**/
@Jwely
Jwely / download_ftp_tree.py
Last active March 4, 2024 11:39
recursive ftp directory downloader with python
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
@KhepryQuixote
KhepryQuixote / PyFrackETL.py
Last active May 4, 2021 14:12
Python scripts to download, extract, and output oil, gas, and/or fracking well information from various states in the United States of America.
# -*- coding: utf-8 -*-
'''
This Python script is oriented towards oil, gas, and fracking well
information download, extract, and output at the state-level within
the United States of America. Not all states are present as not all
states either allow fracking or have any sites available for download.
This Python script is dependent upon another Python script entitled
Src2Tgt.py, which is also available as a Gist under the same name.
@Bakies
Bakies / irc.py
Created June 18, 2012 00:10
Python connect to IRC
import socket, string, time, thread
SERVER = ''
PORT = 6667
NICKNAME = ''
CHANNEL = ''
def main():
global IRC
IRC = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
IRC.connect((SERVER, PORT))