Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/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)) |
##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"
*-------------------------------------------------------------------------- | |
* 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 |
#!/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): |
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.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/