Skip to content

Instantly share code, notes, and snippets.

View josepjaume's full-sized avatar

Josep Jaume Rey josepjaume

View GitHub Profile
@josepjaume
josepjaume / gist:3052389
Created July 5, 2012 08:49
Install mint
sudo apt-get install -y rubygems1.9
sudo gem1.9.1 install compass
echo PATH="/var/lib/gems/1.9.1/bin/:$PATH" >> ~/.profile
@josepjaume
josepjaume / .gitignore
Created July 5, 2012 10:59
SASS & Compass exercises
.sass-cache
./stylesheets
@josepjaume
josepjaume / Gemfile
Created August 10, 2012 09:37
Spinach and VCR
gem 'webmock'
gem 'vcr'
@josepjaume
josepjaume / router.js
Created May 15, 2013 11:57
Get hash location from URL as a fallback on Ember.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 / with-futuroscope-map.rb
Last active December 17, 2015 10:59
Futuroscope post examples
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(:+)
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 / docker-compose.yml
Created November 17, 2017 15:12
decidim-docker
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:

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:

@josepjaume
josepjaume / docker-compose.yml
Created August 19, 2016 13:15
Docker Compose for Rust
rust-server:
image: didstopia/rust-server
restart: always
mem_limit: 15g
ports:
- "28015:28015"
- "28015:28015/udp"
- "28016:28016"
- "80:8080"
volumes: