This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= | |
// ======= | |
// | |
// Arduino Powermeter | |
// | |
// ======= | |
// ======= | |
// | |
// Use Arduino and a photoresistor LED to read impulsion from | |
// an electricity box while it blinks its consumption |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'net/http' | |
http = Net::HTTP.new('ddc.har2009.info', 8080) | |
path = '/DDCAnimationServer/index.ftl' | |
index = 150 | |
class Flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash options | |
export HISTCONTROL=erasedups | |
export HISTSIZE=10000 | |
shopt -s histappend | |
export TERM=linux | |
# Path | |
export PATH=/usr/local/bin:/Users/alx/.gem/ruby/1.8/bin:$PATH | |
export PATH=~/bin:/usr/local/sbin:/opt/local/bin/:/usr/local/git/bin:$PATH | |
export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
El Cumpleaños de Mercedes | |
-- Mirar y Leer -- | |
Aqui solo se lee la luz. | |
Despues de ver lo que he escrito el año pasado, no tengo mas tonterias a escribir en el papel. | |
-- Abrir y Juegar -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@database = SQLite3::Database.new( "first_bar.db" ) | |
@database.execute( "create table bar_table (tag_id INTEGER PRIMARY KEY, username TEXT, credit NUMERIC, nb_beers NUMERIC);" ) | |
# Admin tag | |
tag_in "d00219a440cf08b8" do | |
puts "Alx phone" | |
puts "select username to add credit:" | |
index = 1 | |
@database.execute("select * from bar_table").each do |row| | |
puts "#{index}: #{row[1]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tetalab: un hackerspace Toulousain | |
Après quelques mois d'existence, le Tetalab vient présenter ses projets en cours à Toulibre. | |
Arduino, Table Tangible, OpenCV, Telephone SIP, RFID, XMPP... tellement de jouets pour geeks, tellement peu de temps pour tout expériementer. | |
Le Tetalab est cet endroit où vous pourrez trouver du monde pour monter votre projet, boire des bières et allumer des LEDs! | |
Au programme de ce mercredi chez Toulibre: Qu'est-ce qu'un hackerspace et les particularités de celui de Toulouse? Quels sont les projets fun du moment, et comment s'amuser encore plus en se déplaçant chez les voisins? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'httpclient' | |
Dir.glob("*.jpg").each do |image| | |
filepath = Dir.pwd << "/" << image | |
p "[Uploading] #{filepath}" | |
HTTPClient.post 'http://upload.bayimg.com/upload', | |
{:file => File.new(filepath), | |
:code => "please_be_kind", | |
:tags => "tetalab"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name BayImg.com - Sweet Interface 2.71 | |
// @namespace Manix | |
// @include http://bayimg.com/* | |
// ==/UserScript== | |
var D = document; | |
//////////////////////////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /wp-content/blogs.dir/1/files/avatars/ | |
ruby -e "Dir.glob('**/*.jpg').each{|file| File.rename(file,file.gsub('-full.jpg', '-bpfull.jpg'))}" | |
ruby -e "Dir.glob('**/*.jpg').each{|file| File.rename(file,file.gsub('-thumb.jpg', '-bpthumb.jpg'))}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String | |
property :created_at, DateTime | |
has n, :tags | |
end |