Skip to content

Instantly share code, notes, and snippets.

View stuhli's full-sized avatar

Mathias Stuhlmacher stuhli

View GitHub Profile
@TobiasPalludan
TobiasPalludan / anchors.md
Last active April 9, 2024 13:33
Same-file anchors and cross-file anchors in Github Markdown,

Same-file anchors for Github

Making an anchor to another heading in the same file as the anchor is straightforward.

[The header of this page](#same-file-anchors-for-github)

Will show as The header of this page.

The heading should be downcased, spaces changed to hyphens, and removed anything not a letter, hyphen, or space. If this id is not unique, you add "-1", "-2", and so forth to the header.

@Brainiarc7
Brainiarc7 / xclip-copy-to-clipboard.md
Created April 26, 2017 17:53
Using xclip to copy terminal content to the clip board on Linux

Using xclip to copy terminal content to the clip board:

Say you want to pipe shell output to your clipboard on Linux. How would you do it? First, choose the clipboard destination, either the Mouse clip or the system clipboard.

For the mouse clipboard, pipe straight to xclip:

echo 123 | xclip

For the system clip board, pipe to xclip and select clip directly:

@ckabalan
ckabalan / best_bash_history.sh
Last active May 1, 2024 17:29
The Best Bash History Settings Ever
# /etc/profile.d/best_bash_history.sh
# Save 5,000 lines of history in memory
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A

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
@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",
@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-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-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",
@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)])'