Skip to content

Instantly share code, notes, and snippets.

@nicolasochem
nicolasochem / gist:43106d16aed8bdbf804013f538273e34
Created May 5, 2016 16:27
all git aliases I will ever need
git config --global alias.logg "log --graph --oneline --decorate"
git config --global alias.branchh "for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads"
@nicolasochem
nicolasochem / .tmux.conf
Last active January 8, 2026 22:06
The best tmux configuration in the universe - 2024 version
# Our .tmux.conf file
# Setting the prefix from C-b to C-s
set -g prefix C-s
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-S to other apps
bind C-s send-prefix
@nicolasochem
nicolasochem / submodules.sh
Created February 17, 2014 17:15
Branch-aware git submodules
#!/bin/bash
set -x
cd /tmp/
rm -rf submodules/
mkdir submodules
cd submodules/
# create component repositories
@nicolasochem
nicolasochem / gist:8839715
Created February 6, 2014 07:28
gluster failover test
#!/bin/bash
set +x
calculate()
{
echo "\rSIGINT caught"
for i in {1..3}
do
was_failover=1
old_timestamp=""
@nicolasochem
nicolasochem / gist:6566698
Created September 14, 2013 23:38
openelec issue 2593
bozo:~/.xbmc/temp # cat xbmc.log
16:06:09 T:3045400576 NOTICE: -----------------------------------------------------------------------
16:06:09 T:3045400576 NOTICE: Starting XBMC (12.2 Git:68a881d), Platform: Linux (OpenELEC (official) - Version: 3.2.0, 3.10.11 armv6l). Built on Sep 13 2013
16:06:09 T:3045400576 NOTICE: special://xbmc/ is mapped to: /usr/share/xbmc
16:06:09 T:3045400576 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/xbmc
16:06:09 T:3045400576 NOTICE: special://masterprofile/ is mapped to: /storage/.xbmc/userdata
16:06:09 T:3045400576 NOTICE: special://home/ is mapped to: /storage/.xbmc
16:06:09 T:3045400576 NOTICE: special://temp/ is mapped to: /storage/.xbmc/temp
16:06:09 T:3045400576 NOTICE: The executable running is: /usr/lib/xbmc/xbmc.bin
16:06:09 T:3045400576 NOTICE: Local hostname: bozo
@nicolasochem
nicolasochem / gist:6566663
Created September 14, 2013 23:31
openelec 3.2.0 issue 2593
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.10.11 (stephan@buildserver.fritz.box) (gcc version 4.7.3 (GCC) ) #1 PREEMPT Fri Sep 13 01:30:04 CEST 2013
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 98304
[ 0.000000] free_area_init_node: node 0, pgdat c0b064d8, node_mem_map c0b5b000
[ 0.000000] Normal zone: 768 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
@nicolasochem
nicolasochem / gist:3805805
Created September 30, 2012 04:01
central agent specifications
Central agent specifications
Central agent is a new archipel module configured in archipel.conf :
[CENTRALAGENT]
centralagent = "force", "passive", "auto"
force = this hypervisor is the central agent, subscriber of the pubsub
passive = this hypervisor will publish updates to the central agent
auto = will first check if there already is a central agent. If there is none, become central agent, otherwise, be passive. (this can be delayed to later)
There are 2 pubsubs :