Skip to content

Instantly share code, notes, and snippets.

View vincentp's full-sized avatar

Vincent Peres vincentp

  • Genedata
  • Guebwiller, France
View GitHub Profile
@vincentp
vincentp / gist:bce49c67d8b65e71ad78e465837d641c
Last active February 16, 2024 10:57
TotalEnergie - Charge'Heures
const prixAbonnements = {
// puissance: abonnement TTC
6 : 12.85,
7 : 14.00,
8 : 15.14,
9 : 16.55,
10: 17.69,
11: 18.83,
12: 20.36,
13: 21.48,
{
"zoom_levels": {
"default":3,
"list": {
"5":{"height":1241,"width":800},
"6":{"height":1397,"width":900},
"1":{"height":310,"width":200},
"7":{"height":1552,"width":1000},
"2":{"height":620,"width":400},
"8":{"height":1707,"width":1100},
@vincentp
vincentp / acts_as_something.rb
Created January 28, 2010 09:39
acts_as_something : pattern to extend class
module ActsAsSomething
def self.included(base)
base.extend ActMethods
end
module ActMethods
def acts_as_something
extend ClassMethods
@vincentp
vincentp / jquery.urlize.js
Created December 18, 2009 15:26
jquery.urlize.js
/**
* java -jar jsrun.jar app/run.js -p -a -t=templates/outline ../public/javascripts/urlize.js
*/
/**
* See (http://jquery.com/).
* @name jQuery
* @class
* See the jQuery Library (http://jquery.com/) for full details.
*/
@vincentp
vincentp / jQuery.namespace.js
Created December 10, 2009 11:47
jQuery.namespace.js : Allow you to store all your javascript in namespaces using jQuery.
/*
* $.namespace
* Allow you to store all your javascript in namespaces.
* Call the namespaces only when you need them and avoid useless Javascript DOM manipulation.
*
* 1. Create your namespaces
* $.namespace([
* 'views',
* 'views.home',
* 'session',