Skip to content

Instantly share code, notes, and snippets.

<form method="POST" action="/EmuDofus/CMS/Ancestra/InfiniteCMS/trunk/Accounts/new">
<label for="form_tos">J'accepte les <a class="link" href="/EmuDofus/CMS/Ancestra/InfiniteCMS/trunk/Misc/tos">Conditions G&eacute;n&eacute;rales d'utilisations</a></label>
<input type="checkbox" name="tos" value="" id="form_tos" /><br />
<fieldset id="fs_50">
<label for="fs_50">Donn&eacute;es du compte</label><br />
<div>
<label for="form_pass">Mot de passe<br /></label><input type="text" name="pass" value="" id="form_pass" /><br />
<label for="form_pseudo"><br />Pseudo<br /></label>
</div>
@vendethiel
vendethiel / converting Google Code
Created March 4, 2012 16:40 — forked from anonymous/converting Google Code
sass+cs+haml vs. css+js+html
Translation of Google Maps Code (html + js) to haml + coffeescript
-------------------------------------------------------------------
assets/javascript/application.js
--------------------------------
//
//= require jquery
//= require jquery_ujs
//= require_tree .
assets/javascript/maps.js.coffee
C:/Ruby192/bin/ruby.exe extconf.rb
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_v8'" > v8-i386-mingw32.def
g++ -I. -IC:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/v8/include -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -Wall -g -rdynamic -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o rr.o -c rr.cpp
rr.cpp: In function 'VALUE rr_define_finalizer(VALUE, void*, VALUE)':
rr.cpp:48:1: warning: no return statement in function returning non-void
In file included from rr.cpp:3:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Value, VALUE = long unsigned int]':
_elems = []
if type is 'modify'
_elems.push e.model for e in elems
else
_elems.push e.model for e in @foo.elems
@vendethiel
vendethiel / remove-bom.co
Created June 19, 2012 15:54 — forked from domenic/remove-bom.js
Removing BOM
global[r] = require r for r of <[js path wrench]>
BOM = String.fromCharCode BOM_CHAR_CODE = 65279
wrench.readdirSyncRecursive process.cwd! .forEach (filename) ->
return unless \js is path.extname filename
error, content <-! fs.readFile fileName, \utf8
throw that if error
w =
p:
l: 1
c = ^^w
alert "#{c.p.l} & #{w.p.l}"
c.p.l = 5
alert "#{c.p.l} & #{w.p.l}"
@vendethiel
vendethiel / gist:3011345
Created June 28, 2012 13:21 — forked from dtolj/gist:3005981
auto refresh
#Controller
def action
@tm=Random.rand(11)
render :layout => false
end
#View
#action.haml
=@tm
# thanks to railscasts
class Object
# macvim
def mvim(method_name)
file, line = method(method_name).source_location
`mvim #{file} +#{line}`
end
# sublime text
@vendethiel
vendethiel / gist:3062690
Created July 6, 2012 20:54
Rails UJS plugin rewritten using LiveScript
$ <-! jQuery
/** ###
* Unobtrusive scripting adapter for jQuery
*
* Requires jQuery 1.6.0 or later.
* https://github.com/rails/jquery-ujs
* Uploading file using rails.js
* =============================
@vendethiel
vendethiel / gist:3340605
Created August 13, 2012 13:14
prelude.ls
# This is low level LiveScript - this is not an
# example of how you should write LiveScript.
# Code reuse has taken a back seat to performance,
# because the functions in this libaray will be
# called often, and the code here, once set, will
# not change often.
export objToFunc = objToFunc = (obj) ->
(key) -> obj[key]