Skip to content

Instantly share code, notes, and snippets.

View jruz's full-sized avatar
🏴

Javier Ruz jruz

🏴
View GitHub Profile
@jruz
jruz / SassMeister-input.sass
Created March 16, 2015 15:05
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// Styleguide 4.2.
$new-brand-main: #21A5B8
$new-brand-main-1: #1F8B9B
$new-brand-secondary: #83A1A6
$new-grey-light-1: #EEEEEE
@jruz
jruz / bookmarklet.js
Last active August 29, 2015 14:17
Points calculator
javascript:void%20function(){var%20n,t=[];$(%22.tb-stream-as-block%22).each(function(n,e){var%20r=$(e).find(%22.js-task-list-title%22).text(),o=$(e).find('a[style=%22color:%20rgb(0,%200,%200);%20background-color:%20rgb(74,%20204,%20230);%22]'),a=_.reduce(o,function(n,t){return%20n+parseInt(t.text)},0);return%20t.push({name:r,points:a})}),t.pop(),t.push({name:t[0].name+%22%20+%20%22+t[1].name,points:t[0].points+t[1].points}),n=_.reduce(t,function(n,t){return%20n+t.name+%22:%20%22+t.points+%22\n%22},%22%22),alert(n)}();
@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
@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 / 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 / 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 / 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 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.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.scss
Created June 19, 2015 09:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.3)
// ----
.object {
&:focus + &__element {
color: red;
}
}