Skip to content

Instantly share code, notes, and snippets.

View stuhli's full-sized avatar

Mathias Stuhlmacher stuhli

View GitHub Profile
@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...

@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@puppe
puppe / absender.lco
Last active July 30, 2023 20:14
Deutsche Briefvorlage für LaTeX (scrlttr2) (ACHTUNG: Aktualisierte Version jetzt unter https://codeberg.org/puppe/german-latex-letter-template/)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 24, 2024 01:23
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@sandervm
sandervm / commandline.txt
Last active April 22, 2022 15:15
Generate Django secret key commandline
$ python -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'
@R3V1Z3
R3V1Z3 / crt-asciinema-green.json
Last active October 21, 2022 07:57
Cool Retro Term profile - "Asciinema Green". Just install Cool Retro Term and go to Edit > Settings > Import to import it.
{
"ambientLight": 0.302,
"backgroundColor": "#000000",
"bloom": 0.2747,
"brightness": 1,
"burnIn": 0.558,
"chromaColor": 1,
"contrast": 0.8789,
"flickering": 0,
"fontColor": "#00aa00",
@R3V1Z3
R3V1Z3 / crt-dos-feos.json
Last active August 18, 2022 12:27
Cool Retro Term profile - "DOS Feos". Just install Cool Retro Term and go to Edit > Settings > Import to import it.
{
"ambientLight": 0.16,
"backgroundColor": "#000000",
"bloom": 0,
"brightness": 0.6003,
"burnIn": 0.3,
"chromaColor": 1,
"contrast": 0.85,
"flickering": 0.07,
"fontColor": "#ffffff",
@R3V1Z3
R3V1Z3 / crt-real-pretty.json
Last active August 30, 2021 02:19
Cool Retro Term profile - "Real Pretty". Just install Cool Retro Term and go to Edit > Settings > Import to import it.
{
"ambientLight": 0.1109,
"backgroundColor": "#000000",
"bloom": 0.302,
"brightness": 1,
"burnIn": 0.1451,
"chromaColor": 0,
"contrast": 0.5977,
"flickering": 0,
"fontColor": "#ff007f",
@R3V1Z3
R3V1Z3 / crt-your-so-transparent.json
Last active October 20, 2023 20:17
Cool Retro Term profile - "You're SO transparent!". Just install Cool Retro Term and go to Edit > Settings > Import to import it.
{
"ambientLight": 0,
"backgroundColor": "#000000",
"bloom": 0.0666,
"brightness": 1,
"burnIn": 0.1451,
"chromaColor": 1,
"contrast": 0.957,
"flickering": 0,
"fontColor": "#ffffff",

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main