Skip to content

Instantly share code, notes, and snippets.

View libo's full-sized avatar
😎

Libo Cannici libo

😎
  • Be My Eyes
  • Copenhagen
  • 01:59 (UTC +01:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am libo on github.
  • I am libo (https://keybase.io/libo) on keybase.
  • I have a public key whose fingerprint is 8497 18B9 5F1D ACC1 0D9B A577 7A1D 2BF0 F4B1 37FA

To claim this, I am signing this object:

@libo
libo / cpe_signal.rb
Last active October 18, 2015 15:10
Script to fetch Signa statistic from a HUAWEI CPE via console.
#!/usr/bin/env ruby
# I wrote this script to fetch signal information every 5 minutes and plot a graph based on RSRQ RSRP using Munin / MRTG
# HUAWEI if you don't like what I did please let me know I will remove this script pronto.
#
# Update BASE_URL with the correct IP of your CPE.
# Usage:
# ruby cpe_signal.rb
#
@libo
libo / keybase.md
Created March 28, 2014 11:47
keybase.md

Keybase proof

I hereby claim:

  • I am libo on github.
  • I am libo (https://keybase.io/libo) on keybase.
  • I have a public key whose fingerprint is 2E9A 7912 A3E2 FC70 F797 59F6 816B F69D F877 42A6

To claim this, I am signing this object:

@libo
libo / gist:4413007
Last active December 10, 2015 09:18
New Year's Eve Dinner Menu 2012

Starter

Served with Prosecco Val d'Oca.

  • Crock Casserole Bread Lentils with Bemused Rosmarin
  • Bruschetta Pomodoro & Basilico
  • Svin jeg elsker dig! Potpourri of Sausages Du Jour
  • Vive le fromage!
  • Blanched Rolled Bacon on Spring Onions.

Main

@libo
libo / gist:4110529
Created November 19, 2012 13:03
Evaluation with selector
def evaluate_css(property, selector = 'body')
page.evaluate_script("(typeof jQuery !== 'undefined') && $('#{selector}').css('#{property}')")
end
def expect_css(property, values)
values.each do |selector, value|
begin
wait_until { evaluate_css(property, selector) == value}
rescue Capybara::TimeoutError
evaluate_css(property, selector).should == value
@libo
libo / hashrocket
Created October 18, 2012 08:53
No hashrocket pre-commit
#!/usr/bin/env ruby
# Inspiration from:
# http://jish.github.com/pre-commit/
# https://gist.github.com/2711625
messages = []
HASROCKET_PATTERN = ':.*=>'
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified
libo☃gigante ~ brew rm libogg 06:19:08
Uninstalling /usr/local/Cellar/libogg/1.2.2...
libo☃gigante ~ brew install -v libogg 06:19:15
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
libo☃gigante ~ brew rm -f libogg 06:51:42
Uninstalling libogg...
libo☃gigante ~ brew rm -f libvorbis 07:46:15
libo☃gigante ~ brew install -v libvorbis 07:46:19
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
@libo
libo / IO performances
Created March 2, 2011 10:52
Test between Progressive, ElasticHosting, Racksapce
Test creates a 128M file full of zeros
Progressive FreeBsd 8.2
[libo@bsd_1G_10G]/home/libo(11:50:12): dd if=/dev/zero of=test_file bs=128K count=1K
1024+0 records in
1024+0 records out
134217728 bytes transferred in 1.570875 secs (85441371 bytes/sec)
ElasticHosting FreeBsd 8.0
> dd if=/dev/zero of=test_file bs=128K count=1K