Skip to content

Instantly share code, notes, and snippets.

View pierreozoux's full-sized avatar

Pierre Ozoux pierreozoux

View GitHub Profile
@pierreozoux
pierreozoux / dump from ey-local up
Created December 12, 2012 10:55
Error when running monit recipe from cookbooks folder
[default] [Tue, 11 Dec 2012 19:31:31 +0000] INFO: Ran execute[cleanup-backup-inittab] successfully
[Tue, 11 Dec 2012 19:31:31 +0000] INFO: Chef Run complete in 131.255645 seconds
[default] ln:
[default] creating symbolic link `/etc/chef-custom/recipes/cookbooks/cookbooks'
[default] : Read-only file system
[default]
[default] [Tue, 11 Dec 2012 19:31:31 +0000] INFO: Starting Chef Solo Run
[default] /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/node.rb:180:in `method_missing'
[default] :
[default] Attribute default is not defined!
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11/lib/active_record/attribute_assignment.rb:88:in `block in assign_attributes'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11/lib/active_record/attribute_assignment.rb:78:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11/lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11/lib/active_record/base.rb:497:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-3.0.4/lib/delayed/backend/base.rb:29:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-3.0.4/lib/delayed/backend/base.rb:29:in `enqueue'
/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-3.0.4/lib/delayed/message_sending.rb:13:in `method_missing'
/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-3.0.4/lib/delayed/message_sending.rb:48:in `block in handle_asynchronously'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:513:in `_run__3949307421592321204__create
@pierreozoux
pierreozoux / csv2html.rb
Last active December 13, 2015 16:59
2 little quick and dirty script. A shell script to push ressources usage from a process running to a csv file. And a ruby script to draw a graph from a csv file.
#!/usr/bin/env ruby
require 'erb'
require 'csv'
csv_path = ARGV[0]
@csv_array = CSV.read(csv_path)
@csv_array.each_with_index do |row,row_index|
@pierreozoux
pierreozoux / portKnocking.md
Last active January 11, 2020 22:54
In Beta, waiting a review!

Have you ever wonder how to do like in secret agent movies : they knock the door with a secret sequence and the door opens! You can do it with your server too! (or RasPi ;)

##Prepare your firewall

edit /etc/iptables.test.rules

*filter

# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0

-A INPUT -i lo -j ACCEPT

@pierreozoux
pierreozoux / brew doctor
Last active December 15, 2015 20:29
brew issue - gnutls-3.1.10
brew doctor
Your system is raring to brew.
brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: c64a2a8fe19c300dd99af8cca665bd17fad64c90
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
@pierreozoux
pierreozoux / Runmefile
Created June 17, 2013 15:59
Example of a Runmefile
#!/bin/bash
tmp_home=/tmp/home_$(basename $PWD)
if [ -d $tmp_home ]; then
rm -rf $tmp_home
fi
mkdir $tmp_home
@pierreozoux
pierreozoux / result
Last active December 18, 2015 16:39
Bug OHAI-478
INTERFACE
Gentoo
type: eth, number: 0:
error here --^
Ubuntu
type: eth, number: 0
Addresse
Gentoo
nil
Ubuntu
@pierreozoux
pierreozoux / reboot_gentoo.json
Created August 29, 2013 16:19
reboot_gentoo not working
{
"provisioners": [
{
"type": "shell",
"inline": [
"echo '1st script'",
"reboot",
"ifconfig enp0s3 down"
]
},
@pierreozoux
pierreozoux / gist:7292309
Created November 3, 2013 16:59
Python...
✘ pierreozoux@local ⮀ ~ ⮀ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.today()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'today'
>>> from datetime import datetime
@pierreozoux
pierreozoux / car.js
Last active July 25, 2016 21:44
Issue in context - how to solve that?
function Car(color) {
this.color = color
}
Car.prototype.getColor = function() {
return this.color;
}
car = new Car('blue');