Skip to content

Instantly share code, notes, and snippets.

View AlSquire's full-sized avatar

Arnaud Lécuyer AlSquire

View GitHub Profile
@AlSquire
AlSquire / monsters.json
Last active August 29, 2015 14:16
Monster Hunter4 Helper
{
"Akantor":"Water: X, Dragon: XXX",
"Basarios":"Fire: X, Water: XX, Thunder: X, Ice: X, Dragon: XX",
"Ruby basarios":"Fire: X, Water: X, Thunder: X, Ice: XX",
"Brachydios":"Water: XX, Ice: X",
"Raging brachydios":"Water: X, Ice: XX",
"Cephadrome":"Water: X, Thunder: XX, Ice: XXX",
"Congalala":"Fire: XX, Water: X, Thunder: X, Ice: X",
"Emerald congalala":"Fire: X, Water: XX, Thunder: X, Ice: XXX",
"Daimyo hermitaur":"Fire: XXX, Thunder: XXX, Ice: X",
@AlSquire
AlSquire / app.js
Last active August 29, 2015 14:18
/**
* Welcome to Pebble.js!
*
* This is where you write your app.
*/
var UI = require('ui');
var ajax = require('ajax');
function fetchJSON(url) {
Testouille de push sur github.
Wesh wesh !
Devinette :
Que faire quand une blonde vous envoie une grenade ?
Réponse :
La dégoupiller et lui renvoyer !
<div class="help">
<h1>Help for you !</h1>
<p><%= yield %></p>
</div>
@AlSquire
AlSquire / velib.php
Created April 9, 2009 09:53
Etat des stations velib en indiquant le numéro de station.
<html>
<head><title>Hihi Velib !</title></head>
<body>
<?php
//TODO: show time, in order to check that the page have fresh data + refresh link on it
function get_station_datas($station_number) {
$url = "http://www.velib.paris.fr/service/stationdetails/{$station_number}";
$xml = simplexml_load_file($url);
@AlSquire
AlSquire / super_hyper_simple_rss_reader.php
Created April 13, 2009 16:53
Parse juste un seul flux Rss, ya rien à voir, circulez ^^
<?php
// Parse juste un seul flux Rss, ya rien à voir, circulez ^^
$url = "http://alsquire.tumblr.com/rss"; // A remplacer
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-style-type" content="text/css" />
class Fixnum
def add_toto(val)
return "la tete a toto" if val == 0 && self == 0
old_add(val)
end
alias old_add :"+"
alias :"+" add_toto
end
# Ok, forget the other method, just use ActiveSupport Inflector (from which version ?)
$KCODE = 'UTF-8' # For Windows.
# But a string with accents typed in the Windows command line will still have a NoMethodError 'normalize'.
require 'rubygems'
gem 'activesupport'
require 'activesupport'
txt = "Hé hoé Huhuh, tu as déjà vu du kawaï sur une adresse@mail.com ? CAPitALE !"
gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com" if yes?('Use shoulda gem?')
gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com" if yes?('Use factory_girl gem?')
gem "mocha" if yes?('Use mocha gem?')
gem "haml" if yes?('Use haml gem?')
if yes?('Git init?')
git :init
file '.gitignore', <<-EOF
log
tmp
db/*.sqlite3
"ta mere" / [:bus] # => Ta mère en string sur un arrêt de bus