Skip to content

Instantly share code, notes, and snippets.

@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 :
@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: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: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 / 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 / .tmux.conf
Last active February 19, 2023 00:41
The best tmux and vim configuration in the universe
# 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 / 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"

Keybase proof

I hereby claim:

  • I am nicolasochem on github.
  • I am nicolasochem (https://keybase.io/nicolasochem) on keybase.
  • I have a public key whose fingerprint is 3413 FAE8 B970 D218 F976 76D5 0957 1413 93AB BBAD

To claim this, I am signing this object:

@nicolasochem
nicolasochem / lightning.md
Last active March 29, 2018 05:52
lightning mainnet experiment
  1. setup a bitcoind container following the guide on https://medium.com/@dougvk/run-your-own-mainnet-lightning-node-2d2eab628a8b Also setup bitcoin-cli. sync the chain

  2. clone https://github.com/lightningnetwork/lnd, cd to the folder

  3. do docker-compose run -d --name alice lnd_btc. It will create a lnd container and a btcd container. docker rm them (instead, it would be possible to just create the lnd container and not start it)

  4. go to /scratch, edit the bitcoind configuration following instructions on that other guide: https://gist.github.com/itoonx/618ab3cba41252ccadcbf9ec54ecb71c