Skip to content

Instantly share code, notes, and snippets.

View josemarluedke's full-sized avatar

Josemar Luedke josemarluedke

View GitHub Profile
@josemarluedke
josemarluedke / README.md
Last active December 18, 2015 03:38
Default README.md file for Rails projects

Project name

Project description...

Development environment

Make sure you have installed Ruby 2.0.0.

Then just checkout the code, configure dependencies and run the tests:

@josemarluedke
josemarluedke / gist:5881143
Created June 27, 2013 22:57
Install and create user on PostgreSQL
$ sudo apt-get install postgresql libpq-dev postgresql-contrib
$ sudo -u postgres createuser desired_user
$ cd /etc/init.d/
$ sudo -u postgres psql template1
template1=# ALTER USER desired_user WITH PASSWORD 'desired_password';
@josemarluedke
josemarluedke / gist:6440351
Created September 4, 2013 17:51
Pushing specific tags to Heroku
$ git tag -a v1.1
$ git push heroku v1.1^{}:master
@josemarluedke
josemarluedke / gist:7684953
Created November 27, 2013 23:35
Disable responsive from foundation 4
.row
width: 100%
max-width: 62.5em
min-width: 62.5em
.row, .row .row
width: auto
margin-left: -0.9375em
margin-right: -0.9375em
margin-top: 0
@josemarluedke
josemarluedke / README.md
Last active August 29, 2015 13:55
Github Issue to Pull-request
@josemarluedke
josemarluedke / Irio.schedule
Last active August 29, 2015 13:56
Irio Schedule
Segunda 14:00 - 18:00 4 horas
Terça 16:30 - 20:30 4 horas
Quarta 16:30 - 20:30 4 horas
Quinta 16:30 - 20:30 4 horas
Sexta 14:00 - 18:00 4 horas
@josemarluedke
josemarluedke / controller.rb
Last active August 29, 2015 13:57
Neighbor.ly near projects
def index
@city = user_city
@project_locations = project_locations(@city)
@near_projects = Project.with_state('online').near(@city, 100).visible.order('distance').limit(4)
used_ids += @near_projects.map(&:id) if @near_projects.any?
end
def near
raise ActionController::UnknownController unless request.xhr?
@projects = apply_scopes(Project).with_state('online').near(params[:location], 100).visible.order('distance').page(params[:page]).per(4)
render layout: false
#= require spec_helper
describe "Dashboard.ApplicationStore", ->
beforeEach( ->
Test.store = TestUtil.lookupStore()
)
it "works with latest Ember-Data revision", ->
assert.equal Test.store.get('revision'), 12
SyntaxError at /sessions
========================
> syntax error, unexpected <<
activesupport (4.1.1) lib/active_support/dependencies.rb, line 443
------------------------------------------------------------------
``` ruby
438 const_paths = [const_paths].compact unless const_paths.is_a? Array