Skip to content

Instantly share code, notes, and snippets.

View jeromegn's full-sized avatar
🏠
Rusting it up

Jerome Gravel-Niquet jeromegn

🏠
Rusting it up
View GitHub Profile
up_vote: function(data, callback){
data.type="upvote";
console.log(has_voted, 'has_voted, line 87');
mdb.collection('kudos_bank', function(err, coll){
coll.find({'target_hash':data.target_hash, 'id':data.id}, function(err, cursor){
cursor.toArray(function(err, docs){
console.log(docs);
if (docs.length == 0) {
ERROR: Loading command: install (Bundler::GemNotFound)
Could not find gem 'amqp (>= 0, runtime)' in the gems available on this machine.
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
source "http://rubygems.org"
gem "amqp"
gem "eventmachine"
gem "em-websocket"
gem "twitter-stream"
gem "uuid"
NameError: uninitialized constant Sass::SyntaxError
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:143:in `exception_string'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:100:in `rescue in update_stylesheet'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:96:in `update_stylesheet'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:83:in `block (2 levels) in update_stylesheets'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:78:in `each'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:78:in `block in update_stylesheets'
/Users/jgn/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.22/lib/sass/plugin.rb:76
= border-radius(!radius = 10px)
-moz-border-radius= !radius
-webkit-border-radius= !radius
border-radius= !radius
= border-top-radius(!radius = 10px)
+border-top-left-radius(!radius)
+border-top-right-radius(!radius)
class Imports < Application
def index
render
end
<<<<<<< HEAD:app/controllers/imports.rb
def preview(file, software)
if valid_import?(file, software)
move_tempfile(file, software, @current_user)
var cont = $(jetpack.tabs.focused.contentDocument).find("body");
// Loading the default active corners template
$.ajax({
url: "http://test.jeromegn.is-a-geek.com/widget/base",
type: "GET",
success: function(data, textStatus) {
cont.append(data);
},
var app = $.sammy(function() { with(this) {
get('#/repondre/:comment_id', function() { with(this) {
partial('/templates/comments/new.html.erb', {parent_id: params['comment_id']}, function(content){
$("#comment_"+params['comment_id']).append(content);
});
}});
}});
<%= form_for(@user, :action => "/users/#{@user.login}") %>
<%= hidden_field :value => "DELETE", :name => "_method" %>
<div class="actions">
<input type="image" name="submit" src="/images/btn-delete_user.png" id="deleteUser" />
or <%= link_to "cancel", resource(:users) %>
</div>
<% end =%>
Structure
=========
Form
Fields
Elements
Label (optional but most common)
Element
Label (optional in case of a a checkbox or radio)
Input Checkbox/Radio