Skip to content

Instantly share code, notes, and snippets.

View Sasszem's full-sized avatar
💥
Burning the dynamite at both ends

László Baráth Sasszem

💥
Burning the dynamite at both ends
  • Szolnok, Hungary
View GitHub Profile
@fnky
fnky / ANSI.md
Last active November 18, 2024 06:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@BenWiederhake
BenWiederhake / md4.py
Created July 22, 2018 17:45 — forked from bonsaiviking/md4.py
Simple MD4 digest implementation in pure Python
#!/usr/bin/env python3
# Based on https://gist.github.com/bonsaiviking/5644414
# Converted to Python3 by hand.
import codecs
import struct
def leftrotate(i, n):
return ((i << n) & 0xffffffff) | (i >> (32 - n))
@dakoctba
dakoctba / gist:7676845
Last active November 2, 2024 18:59
How To Reset Your Github Fork

##How To Reset Your Github Fork

Let’s say I want to contribute to a project on github. The project repository is at wp-cli/wp-cli. First I fork it, and then clone the resulting repository, scribu/wp-cli:

git clone --recursive [email protected]:scribu/wp-cli.git
cd wp-cli

Now, I make some commits to master, push them to my fork and open a pull request. Piece of cake:

git commit -m "awesome new feature"

@chanmix51
chanmix51 / tetrodes_pentodes.sub
Created October 12, 2013 08:20
LTSpice models for vacuum tubes
*--------------------------------------------------------------------------
* Model generated by Motega software:
*
* Modeling Of Tubes Employing Genetic Algorithms
*
* Models contain 1G resistors from all nodes to earth in order to avoid
* floating nodes. Triode and tetrode/pentode models contain a diode for
* simulating grid current.
*
* Non-commercial use is permitted, but at your own risk... This model
@bonsaiviking
bonsaiviking / md4.py
Created May 24, 2013 15:41
Simple MD4 digest implementation in pure Python
#!/usr/bin/env python
import struct
def leftrotate(i, n):
return ((i << n) & 0xffffffff) | (i >> (32 - n))
def F(x,y,z):
return (x & y) | (~x & z)
def G(x,y,z):
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...