Skip to content

Instantly share code, notes, and snippets.

View francoisjacques's full-sized avatar

François Jacques francoisjacques

View GitHub Profile
@shamil
shamil / mount_qcow2.md
Last active November 5, 2025 00:00
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@csfrancis
csfrancis / gdb_ruby_backtrace.py
Last active June 25, 2024 19:12
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
@leemour
leemour / FontFix RubyMine
Last active October 6, 2018 06:42
Fixing font anti-aliasing for Ubuntu.
# Change Java Runtime:
sudo update-alternatives --config java
# Delete Open-JDK
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
# Change fonts - remove hinting:
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font
# Change RubyMine AntiAliasing first:
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 14, 2025 12:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@usergenic
usergenic / iterm-cmd-click-emacsclient
Created September 21, 2011 19:51
iterm2 users, want cmd-click to open file in emacs?
#!/bin/bash
# This file is for iTerm2 users.
#
# Put this file in /usr/local/bin/iterm-cmd-click-emacsclient
#
# You'll need to do the following at command line...
# $ defaults write com.googlecode.iterm2 SemanticHistoryHandler /usr/local/bin/iterm-cmd-click-emacsclient
emacsclient -e "(find-file \"$1\")" "(goto-line $2)"