Skip to content

Instantly share code, notes, and snippets.

View artero's full-sized avatar

Juan Artero artero

  • marsbased
  • Barcelona
View GitHub Profile
@oriolbcn
oriolbcn / reload.rb
Created July 25, 2018 09:19
Reload gem from library in Rails 5+
if Rails.env.development?
localistico_files = Dir['lib/localistico/*.rb'] + ['lib/localistico.rb']
reloader = ActiveSupport::FileUpdateChecker.new(localistico_files) do
localistico_files.each { |file| load file }
end
ActiveSupport::Reloader.to_prepare do
reloader.execute_if_updated
end
end
@artero
artero / _radio.sass
Created June 2, 2016 11:31 — forked from javierartero/_radio.sass
Radio buttons
$radio-color-active: $brand-primary !default
$radio-color-scale-active: 1.1 !default
$radio-box-size: 1.2em !default
$radio-box-size-padding: 2px !default
$radio-box-top: 0.05em !default
$radio-box-padding: $radio-box-size + .75em !default
.radio
input[type="radio"]
@extend .sr-only
$checkbox-color-active: $brand-primary !default
$checkbox-color-scale-active: 1.1 !default
$checkbox-box-size: 1.2em !default
$checkbox-box-top: 0.05em !default
$checkbox-box-padding: $checkbox-box-size + .75em !default
.checkbox
input[type="checkbox"]
@extend .sr-only
@wwvuillemot
wwvuillemot / .gitignore
Created August 14, 2014 18:21
Unity GIT Ignore
# =============== #
# Unity generated #
# =============== #
# temporary files that you do not want to share with other users
Temp/
Obj/
UnityGenerated/
Library/
# optional, but you likely do not want to store
# your builds in your git repo due to size
@bomsy
bomsy / Comments
Created December 7, 2012 15:34
Sharing data between tasks
In the scenario below task2 depends on the result from task1 which is stored
in value property of the meta object(this is just an example) which does not initially exist but is created from within
task1. task2 can later have access to the value using <%= meta.value %> at a later time.
This way two tasks can share data..
There may be better ways of doing this, if you have come across please share
@artero
artero / keyrepeat.shell
Created November 5, 2012 14:36 — forked from kconragan/keyrepeat.shell
Enable key repeat in Apple Lion for Sublime Text 2 in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text 2 if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@olivierlacan
olivierlacan / .pryrc
Created January 5, 2012 01:16 — forked from renz45/.pryrc
Pry configuraton
# switch default editor for pry to sublime text
Pry.config.editor = "sublime"
# format prompt to be <Rails version>@<ruby version>(<object>)>
Pry.config.prompt = proc do |obj, level, _|
prompt = "\e[1;30m"
prompt << "#{Rails.version} @ " if defined?(Rails)
prompt << "#{RUBY_VERSION}"
"#{prompt} (#{obj})>\e[0m"
end
@nicalpi
nicalpi / facebook_registration.rb
Created September 7, 2011 11:48
Testing Omniauth with Devise, Rspec and Capybara
background do
set_omniauth()
click_link_or_button 'Sign up with Facebook'
end
@artero
artero / comandos.markdown
Created August 1, 2011 11:51 — forked from trico/comandos.md
Comandos git

##Tanto para nuevas features como para bugfixes o releases:

$ git checkout -b myfeature develop Switched to a new branch "myfeature" $ git checkout develop Switched to branch 'develop' $ git merge --no-ff myfeature Updating ea1b82a..05e9557 (Summary of changes) $ git branch -d myfeature

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')