Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕

Libo Cannici libo

🍕
View GitHub Profile
View 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 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 Oct 18, 2015
Script to fetch Signa statistic from a HUAWEI CPE via console.
View cpe_signal.rb
#!/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
#
View 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 Dec 10, 2015
New Year's Eve Dinner Menu 2012
View gist:4413007

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 Nov 19, 2012
Evaluation with selector
View gist:4110529
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 Oct 18, 2012
No hashrocket pre-commit
View hashrocket
#!/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
View gist:893860
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
View Problem with libvorbis
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 Mar 2, 2011
Test between Progressive, ElasticHosting, Racksapce
View IO performances
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