Skip to content

Instantly share code, notes, and snippets.

View tonygaetani's full-sized avatar
🏠
Working from home

Tony Gaetani tonygaetani

🏠
Working from home
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 21, 2025 01:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ahpook
ahpook / memorysize_raw.rb
Created September 8, 2011 00:28
Custom facter fact for raw memorysize.
# for some reason facter takes the raw memorysize and reports it as
# a formatted string, which is useless for calculation
#
Facter.add("memorysize_raw") do
confine :kernel => :linux
setcode do
size = 0
File.readlines("/proc/meminfo").each do |l|
size = $1.to_f if l =~ /^MemTotal:\s+(\d+)/