Skip to content

Instantly share code, notes, and snippets.

View xeBuz's full-sized avatar
🧉
Converting mate into technical debts

Jesús Roldán xeBuz

🧉
Converting mate into technical debts
View GitHub Profile
@xeBuz
xeBuz / dolina.sh
Created July 13, 2011 00:44
Descargar "La venganza sera terrible", programa conducido por Alejandro Dolina
#!/bin/bash
#
# Script que descarga La Venganza Sera Terrible, de Alejando Dolina
# Gracias a Venganzasdelpasado.com.ar que siempre deja los links listos
#
# Recomendado: dejar cron programado para que lo corra despues de las 3am
#
day=`date +%d '--date=-1 day'`
@xeBuz
xeBuz / mpd_recomendation.py
Created July 22, 2011 22:55
Recomended Playlist - MPD
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import random
from mpd import (MPDClient, CommandError)
from audioscrobbler import AudioScrobblerQuery
""" MPD """
@xeBuz
xeBuz / random_simpsons.py
Created September 25, 2011 21:48
Random caps
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import os
import sys
import random
###
# To Do
# - Agregar por Temporada.
@xeBuz
xeBuz / usuarios.py
Created July 11, 2012 13:05
Traer los usuarios de la DB
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import kinterbasdb
import sys
""" Establece la base de datos, nombre, sin extension, de /media/db/desa/ """
if len(sys.argv) < 2:
print "Debe colocar como parámetro el nombre de la base de datos"
sys.exit(1)
@xeBuz
xeBuz / hurdles.sh
Created August 7, 2012 20:20
Script que corre por vos en el Doodle de Google
#!/bin/bash
# https://www.google.com/doodles/hurdles-2012
for i in `seq 1 600`;
do
xdotool search "Mozilla Firefox" windowactivate --sync key Left
xdotool search "Mozilla Firefox" windowactivate --sync key Right
done
@xeBuz
xeBuz / marilyn.py
Created September 25, 2012 04:01
Ejercicio
#!/usr/bin/python2
# -*- coding: utf-8 -*-
a = ['A1', 'A2', 'A3', 'A4']
b = ['B1', 'B2', 'B3']
c = ['C1', 'C2']
d = []
for i in a:
@xeBuz
xeBuz / console2gif.sh
Created October 18, 2012 01:48
Convert the console to a gif for n seconds
#!/bin/bash
clear
mkdir temp_gif
segs=`expr $1 \* 5`
for (( i = 1; i <= $segs ; i++ ));
do
printf -v number "%06d" $i
import -window $WINDOWID temp_gif/$number.gif
@xeBuz
xeBuz / playcounts.py
Last active February 13, 2018 13:28
Get artists and tracks w/playcounts form Lastfm user.
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import pylast
api_key = '189c5354198342a01be847e595afbb14'
username = 'eikiu'
api = pylast.LastFMNetwork(api_key = api_key)
user = pylast.User(username, api)
library = user.get_library()
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
var PlayerGravity = function (game, x, y) {
this.game = game;
this.speed = 5;
Phaser.Sprite.call(this, this.game, this.game.world.randomX, 10, 'chocobo');
game.physics.enable( [ this ], Phaser.Physics.ARCADE);
this.body.collideWorldBounds = true;
this.body.bounce.y = 0.8;
};