Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
CMCDragonkai / memory_layout.md
Last active April 7, 2025 13:55
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@kaleksandrov
kaleksandrov / global-protect.sh
Last active May 15, 2025 23:41
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@jrziviani
jrziviani / mutt.txt
Last active September 5, 2022 16:30
mutt cheat sheet
Mutt
http://www.mutt.org/doc/manual/manual.html
Select (tag) messages: shift+t (T)
= (string)
~ (expression)
~b expr (message with expr in body)
[b]body
@romainl
romainl / Vim_pushing_built-in_features_beyond_their_limits.markdown
Last active April 20, 2025 06:58
Vim: pushing built-in features beyond their limits

Vim: pushing built-in features beyond their limits

The situation

Searching can be an efficient way to navigate the current buffer.

The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:

  • when we want to search something that's not directly there, those two commands can make us lose context very quickly,
  • when we need to compare the matches.

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@mario21ic
mario21ic / socat_examples
Created June 23, 2017 17:42
Examples for using socat (and filan)
// Examples for using socat (and filan)
//"$" means normal user, "#" requires privileges, "//" starts a comment
///////////////////////////////////////////////////////////////////////////////
// similar to netcat
// connect to 10.1.1.1 on port 80 and relay to and from stdio
@Tras2
Tras2 / Set-WmiNamespaceSecurity.ps1
Created June 29, 2017 13:11
This is a modified version of a script which can be used to set the WMI permissions for both Agent-less User-ID and WMI Probing. It is designed to be run from a PowerShell prompt and can be used to set the local WMI settings, or the settings of a remote computer.
# Copyright (c) Microsoft Corporation. All rights reserved.
# For personal use only. Provided AS IS and WITH ALL FAULTS.
# Set-WmiNamespaceSecurity.ps1
# Example: Set-WmiNamespaceSecurity root/cimv2 add steve Enable,RemoteAccess
# Taken from https://live.paloaltonetworks.com/t5/Management-Articles/PowerShell-Script-for-setting-WMI-Permissions-for-User-ID/ta-p/53646
# Modified by Stuart Clarkson (https://github.com/Tras2)
Param (

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@guiniol
guiniol / aliases.muttrc
Last active October 27, 2024 09:44
neomutt configuration with notmuch
alias YOU YOUR NAME <[email protected]>