Skip to content

Instantly share code, notes, and snippets.

View enricostano's full-sized avatar

Enrico Stano enricostano

View GitHub Profile
@enricostano
enricostano / builds_3500419
Last active August 29, 2015 14:01
feature/api3 - Addressed comments bravo
[Travis CI] Specs benchmark:
Models 00:17:53
Enterprise Models 00:01:12
Syntax 00:00:47
Production config 00:00:54
Enterprise config 00:02:26
Customizations 00:00:43
Jade precompile 00:00:54
Helpers 00:01:24
JS Unit 00:00:23
'use strict';
var $ = require('jquery')
, Backbone = require('backbone')
, Marionette = require('backbone.marionette')
, app = new Marionette.Application();
Backbone.$ = $;
app.start();
{
"name": "katuma-web",
"version": "0.0.1",
"homepage": "https://github.com/coopdevs/katuma-web",
"description": "Single page frontend application for Katuma API",
"main": "index.html",
"license": "AGPL",
"ignore": [
"**/.*",
"node_modules",
<tr>
<td class="cella_maquetacio_mitjana">
<table class="taula_maquetacio" summary="contenidos específicos" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="cella_maquetacio_estreta"><img src="imatges/fotos/colen.jpg" alt="Maite Colen" width="86" height="98"></td>
<td class="cella_maquetacio_estreta"rowspan="2"><img src="estils_ub/css_img/espai.gif" alt="imagen de maquetaci&oacute;n" width="12" height="1"></td>
<td class="cella_maquetacio_ampla"><h1 class="titol_text1">Maite Col&egrave;n Riau</h1>
<span class="titol_taula_dades">Coordinaci&oacute; de l'&agrave;mbit de recerca: Formaci&oacute; Permanent del Professorat i Innovaci&oacute; Pedag&ograve;gica.</span><br>
<img src="estils_ub/css_img/marcador_cercle3.gif" alt="marcador" height="16" width="10"> <a href="http://www.ub.edu/fodip/membres/colen_cat2.htm" class="text_base_enll"> Curr&iacute;culum <br>
<img src="imatges/
def author(target)
case target
when User
do_this_to(target)
when Person
do_that_to(target)
else
raise ArgumentError
end
end
@enricostano
enricostano / chef_vagrant
Created January 25, 2014 15:17
Chef on Vagrant VM
[2014-01-25T15:01:06+00:00] WARN: Cloning resource attributes for package[build-essential] from prior resource (CHEF-3694)
[2014-01-25T15:01:06+00:00] WARN: Previous package[build-essential]: /tmp/vagrant-chef/chef-solo-2/cookbooks/build-essential/recipes/debian.rb:40:in `block in from_file'
[2014-01-25T15:01:06+00:00] WARN: Current package[build-essential]: /tmp/vagrant-chef/chef-solo-2/cookbooks/rbenv/providers/ruby.rb:102:in `block in install_ruby_dependencies'
[2014-01-25T15:01:07+00:00] WARN: Cloning resource attributes for package[bison] from prior resource (CHEF-3694)
[2014-01-25T15:01:07+00:00] WARN: Previous package[bison]: /tmp/vagrant-chef/chef-solo-2/cookbooks/build-essential/recipes/debian.rb:40:in `block in from_file'
[2014-01-25T15:01:07+00:00] WARN: Current package[bison]: /tmp/vagrant-chef/chef-solo-2/cookbooks/rbenv/providers/ruby.rb:102:in `block in install_ruby_dependencies'
2.0.0p247 :001 > g = Group.first
Group Load (1.6ms) SELECT "groups".* FROM "groups" ORDER BY "groups"."id" ASC LIMIT 1
=> #<Group id: 1, name: "coope", created_at: "2013-12-06 17:37:56", updated_at: "2013-12-06 17:37:56">
2.0.0p247 :002 > g.as_json
=> {"id"=>1, "name"=>"coope", "created_at"=>Fri, 06 Dec 2013 17:37:56 UTC +00:00, "updated_at"=>Fri, 06 Dec 2013 17:37:56 UTC +00:00}
factory :user do
name "Jessie Pinkman"
email
password "secret"
password_confirmation "secret"
factory :group_admin, parent: :user do
ignore do
group = nil
end
$ java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://ci.myhost.com:8080/ reload-configuration
[WARN] Failed to authenticate with your SSH keys. Proceeding as anonymous
hudson.security.AccessDeniedException2: anonymous is missing the Overall/Administer permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.Node.checkPermission(Node.java:412)
at jenkins.model.Jenkins.doReload(Jenkins.java:3038)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
class ApiKey < ActiveRecord::Base
after_initialize do
:generate_access_token unless access_token?
end
belongs_to :user
validates :access_token, :user,
presence: true
validates :access_token,
uniqueness: true