Skip to content

Instantly share code, notes, and snippets.

@CocoaBeans
CocoaBeans / gdbinit
Created February 21, 2012 21:58
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 25, 2024 07:26
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@awidegreen
awidegreen / vim_cheatsheet.md
Last active June 17, 2024 03:41
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@simonmichael
simonmichael / average-cashflow.hs
Created November 29, 2012 23:20
hledger scripting exercise
#!/usr/bin/env runhaskell
{-
Print monthly average cashflow by account.
$ average-cashflow.hs YEAR [JOURNALFILE]
-}
module Main where
@unicolet
unicolet / zfs_report.sh
Last active July 26, 2018 17:08 — forked from cypres/zfs_report.sh
ZFS On Linux Version. Note that drive health is not reported since I am running ZFS on a VM
#!/bin/sh
echo "ZFS listing:"
/sbin/zfs list
echo
echo "ZFS compression ratio:"
/sbin/zfs get compressratio | /bin/grep -v @
echo
@dergachev
dergachev / backup-services.md
Last active October 12, 2023 06:14
Results of my backup services research

backup services research

I googled around, especially with site:news.ycombinator.com for backup recommendations. Here are notes on the top hits.

tarsnap

http://www.tarsnap.com/

  • by prolific HN member; focus on encryption and deduplication
@denji
denji / debian-jessie.md
Last active October 3, 2017 15:33
Debian Wheezy (stable) to Jessie (testing)
Migrate Debian 7 (Wheezy) to Debian 8 (Jessie)
# apt-get install sudo
# List jessie* http://mirror.yandex.ru/debian/dists/
sudo sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade # first only upgrade (safe)
sudo apt-get dist-upgrade
sudo apt-get install firmware-realtek
@stefan2904
stefan2904 / backupSessionstore.sh
Created July 30, 2014 19:40
quick & dirty script to backup Firefox's sessionstore (contains open tabs, etc). run @daily via cron for maximum comfort.
#!/bin/sh
SESSIONSTORE="<path to Firefox profile dir>/<profile>.default/sessionstore.js"
TARGET="<some secure/synced location>/sessionstore"
# TODO: add other files here (bookmarks?)
FORMAT=`date +%Y-%m-%d`
cp "${SESSIONSTORE}" "${TARGET}/${FORMAT}_sessionstore.js"
@travisdahlke
travisdahlke / ledger2beancount.py
Created November 7, 2014 18:57
Ledger to Beancount
#!/usr/bin/python
import ledger
import sys
import re
def account_name(post):
account = post.account.fullname().replace(" ","").replace("(","").replace(")","").replace("'","")
return re.sub(r'\:(\d)',r':X\1', account)
@tYGjQCsvVI
tYGjQCsvVI / gist:3914c0d8f248fb8c364f
Created December 26, 2014 21:10
run 'filefrag' against all files recursively, reprint it in a sortable format and sort it.
find . -type f -exec filefrag {} \; | sed -r 's/(.*)\: ([0-9]+) extents? found/\2 - \1/g' | sort -nr