Skip to content

Instantly share code, notes, and snippets.

Josep Jaume Rey josepjaume

Block or report user

Report or block josepjaume

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am josepjaume on github.
  • I am josepjaume (https://keybase.io/josepjaume) on keybase.
  • I have a public key ASCyMVYKDqjIg-xIEEODJ3D6du3aCiQJMFNRG2xaa9cw5Ao

To claim this, I am signing this object:

View docker-compose.yml
version: '3'
services:
app:
image: decidim/decidim:0.7.2
working_dir: /app
volumes:
- .:/app
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
environment:
@josepjaume
josepjaume / docker-compose.yml
Created Aug 19, 2016
Docker Compose for Rust
View docker-compose.yml
rust-server:
image: didstopia/rust-server
restart: always
mem_limit: 15g
ports:
- "28015:28015"
- "28015:28015/udp"
- "28016:28016"
- "80:8080"
volumes:
View account_controller.rb
class AccountController < ApplicationController
before_action :authenticate_user!
before_action :set_account
load_and_authorize_resource class: "User"
def show
end
def update
if @account.update(account_params)
@josepjaume
josepjaume / Gemfile
Created Sep 22, 2014
CORS with Rails
View Gemfile
gem 'rack-cors'
View designer.html
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
</style>
</template>
<script>
@josepjaume
josepjaume / ember-batch-find.js
Created Apr 9, 2014
Batch find for ember data - it waits for multiple calls on the same run loop and performs a single request on the API
View ember-batch-find.js
// Batch find for Ember Data. It will coerce all the finds on the same run loop
// and execute a single batch find for all the records. It mimics the find
// semantics.
//
// Example usage:
//
// var user1 = store.find('user', 1);
// var user2 = store.find('user', 2);
//
// user1.then(function(user){
@josepjaume
josepjaume / with-futuroscope-map.rb
Last active Dec 17, 2015
Futuroscope post examples
View with-futuroscope-map.rb
require 'futuroscope/convenience'
searches = ["Ed Balls", "Lady Gaga", "Justin Bieber"]
results = searches.future_map do|search|
Twitter.search(search, lang: 'en').results.length
end
puts results.inject(:+)
@josepjaume
josepjaume / router.js
Created May 15, 2013
Get hash location from URL as a fallback on Ember.js
View router.js
var HashLocationFromUrl = Ember.HashLocation.extend({
getURL: function(){
var location = this.get('location');
if(location.hash){
return get(this, 'location').hash.substr(1);
}else{
return this.get('location').pathname;
}
}
});
@josepjaume
josepjaume / Gemfile
Created Aug 10, 2012
Spinach and VCR
View Gemfile
gem 'webmock'
gem 'vcr'
You can’t perform that action at this time.