Skip to content

Instantly share code, notes, and snippets.

View nathan-fiscaletti's full-sized avatar
🔨
Reinventing the wheel

Nathan Fiscaletti nathan-fiscaletti

🔨
Reinventing the wheel
View GitHub Profile
@rene-d
rene-d / colors.py
Last active May 30, 2024 01:40
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@nathan-fiscaletti
nathan-fiscaletti / db_reflect
Last active December 31, 2018 01:35
A database reflection daemon for MySql
#!/bin/bash
# Database Reflector
# Written by Nathan Fiscaletti
# Version 0.1.4
# Released 1512531374
# You can add more reflections here
# Use format s_user@s_host:s_pass:s_db>d_user@d_host:d_pass:d_db
# Example: "root@127.0.0.1:pass:db_a>user@8.8.8.8:pass:db_b"
@nathan-fiscaletti
nathan-fiscaletti / Fader.cs
Last active March 29, 2023 04:29
A C# class used to control fading forms in and out
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FormFader
{
/// <summary>
/// An object used to control fading forms in and out.
/// </summary>
class Fader
@zchee
zchee / cgo.md
Last active May 18, 2024 12:13
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@denji
denji / golang-tls.md
Last active May 29, 2024 10:16 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then