Skip to content

Instantly share code, notes, and snippets.


Juan Artero artero

  • marsbased
  • Barcelona
View GitHub Profile
artero / reload.rb
Created July 25, 2018 09:23 — forked from oriolbcn/reload.rb
Reload gem from library in Rails 5+
View reload.rb
if Rails.env.development?
localistico_files = Dir['lib/localistico/*.rb'] + ['lib/localistico.rb']
reloader = do
localistico_files.each { |file| load file }
ActiveSupport::Reloader.to_prepare do
artero / TerminalVim.scpt
Created July 1, 2018 20:44 — forked from charlietran/TerminalVim.scpt
Open file in iTerm vim for MacOS Sierra
View TerminalVim.scpt
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default
artero / 0_reuse_code.js
Created July 21, 2017 07:16
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
artero / _radio.sass
Created June 2, 2016 11:31 — forked from javierartero/_radio.sass
Radio buttons
View _radio.sass
$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
@extend .sr-only
View _checkbox.sass
$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
@extend .sr-only
artero / .gitignore
Last active August 29, 2015 14:15 — forked from wwvuillemot/.gitignore
View .gitignore
# =============== #
# Unity generated #
# =============== #
# temporary files that you do not want to share with other users
# optional, but you likely do not want to store
# your builds in your git repo due to size
artero /
Created November 5, 2012 14:36 — forked from kconragan/
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.
artero / .bashrc
Created October 15, 2012 05:41 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
View .bashrc
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
artero /
Last active October 11, 2015 10:38
Unix como IDE de PHP

find [Buscar archivos]

El comando hace una búsqueda recursiva de archivos el comando tiene la siguiente synopsis:

Todos los argumentos son obcionales, simplificando:

find [path] [atributos] [nombre]
artero /
Created September 27, 2012 22:11
hello jam