Skip to content

Instantly share code, notes, and snippets.

View artero's full-sized avatar

Juan Artero artero

  • marsbased
  • Barcelona
View GitHub Profile
@artero
artero / gist:1118001
Created August 1, 2011 11:50 — forked from trico/gist:1050747
Extraer todas las urls de una cadena
var re = /http([^"'\s]+)/g,
text = 'href="%interes%&i=SoyUnInteres&u=http://google.es/?%moglaA2%20 texto sobre el texto de textos a mas textos %Q /ht href="%interes%&i=OtroInteres&u=http://popplers.com"',
encontrados = text.match(re);
console.log(encontrados);
@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

@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@artero
artero / comandos.md
Created February 16, 2012 10:51 — forked from trico/comandos.md
Comandos git

####Crear una rama y directamente hacer checkout en ella git checkout -b myfeature develop

####Merge especial git merge --no-ff myfeature

####Eliminar una rama git branch -d myfeature

####Crear tag

@artero
artero / Google Closure.sublime-build
Created May 14, 2012 05:50 — forked from insin/Google Closure.sublime-build (Linux)
Google Closure Compiler build for Sublime Text 2
{
"cmd": ["java", "-jar", "${packages}/Google Closure/compiler.jar", "--js", "$file", "--js_output_file", "/dev/null", "--compilation_level", "WHITESPACE_ONLY"],
"file_regex": "^(.*):([0-9]+):() ERROR - (.*)",
"selector": "source.js"
}
@artero
artero / .bashrc
Created October 15, 2012 05:41 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# 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
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.
@artero
artero / .gitignore
Last active August 29, 2015 14:15 — forked from wwvuillemot/.gitignore
# =============== #
# 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
$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
@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