Skip to content

Instantly share code, notes, and snippets.

View jruz's full-sized avatar
🏴

Javier Ruz jruz

🏴
View GitHub Profile
@jruz
jruz / .zshrc
Last active September 18, 2015 11:31 — forked from Morantron/eslint
Use local eslint if available if not use global
eslint () {
if [[ -f ./node_modules/.bin/eslint ]]; then
./node_modules/.bin/eslint $*
else
"${$(nvm which default)%node}eslint" $*
fi
}
@jruz
jruz / bookmarklet.js
Last active September 3, 2015 10:18
Hide reddit .gifv posts
javascript:void%20function(){$(%22.thing%20a.title%22).each(function(){/\.gifv/.test(this.href)%26%26$(this).closest(%22.thing%22).remove()})}();
@jruz
jruz / SassMeister-input.scss
Created June 19, 2015 09:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
.object {
&:focus + &__element {
color: red;
}
}
@jruz
jruz / SassMeister-input.scss
Last active August 29, 2015 14:23
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
.object {
&:focus + &--modifier {
color: red;
}
&:focus + &__element {
@jruz
jruz / SassMeister-input.sass
Created May 26, 2015 10:47
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
.object
&
color: red
font:
family: Arial
@jruz
jruz / SassMeister-input.sass
Created May 21, 2015 13:53
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
.object
&
color: red
&__element
padding: 20px
@jruz
jruz / SassMeister-input.sass
Created May 21, 2015 13:49
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
.object
&
padding: 10px
&__element
padding: 20px
@jruz
jruz / idealista.js
Created May 18, 2015 22:24
Hide rooms that ask for more than 1 month stay
$('article.item').each(function(){
var self = $(this)
, id = self.attr('data-adid')
, url = 'http://www.idealista.com/inmueble/' + id;
$.get(url).done(function(res, status){
var text = $(res).find("#details li:contains('Estancia mínima de')").first().text();
var months = parseInt(text.replace('Estancia mínima de', '').replace('meses', '').trim());
if (months > 1) {
self.hide();
}
@jruz
jruz / kill.bash
Created April 29, 2015 09:57
kill node or ruby processes
# Kill by process ID
ps aux | grep node
ps aux | grep ruby
# Process ID (second from the left)
kill -9 12345
# Kill all named
killall node
killall ruby
@jruz
jruz / shell.sh
Created April 15, 2015 10:54
Simple http server
# Python 2.x:
python -m SimpleHTTPServer 8000
# Python 3.x:
python -m http.server 8000