Skip to content

Instantly share code, notes, and snippets.

Jesús Roldán xeBuz

Block or report user

Report or block xeBuz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xeBuz
xeBuz / template.md
Last active Jun 15, 2017
PR Template
View template.md

What does this Pull Request Do?

How should this be manually tested?

Any background context you want to provide?

@xeBuz
xeBuz / csvtodict.py
Created Feb 5, 2015
Convert a CSV to a PHP key-value fields
View csvtodict.py
import csv
import os
import argparse
parser = argparse.ArgumentParser(description='Convert CSV Columns to a PHP KeyValue array')
parser.add_argument('-f', '--file', action='store', dest='file', default='exampe.csv', help="CSV file. Default: exmple.csv")
parser.add_argument('-k', '--key', action='store', dest='column_key', default='0', help="Key Column Number")
parser.add_argument('-v', '--value', action='store', dest='column_value', default='1', help="Value Column Number")
args = parser.parse_args()
View player.js
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;
};
View _media-queries.scss
// 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
@xeBuz
xeBuz / playcounts.py
Last active Feb 13, 2018
Get artists and tracks w/playcounts form Lastfm user.
View playcounts.py
#!/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()
@xeBuz
xeBuz / console2gif.sh
Created Oct 18, 2012
Convert the console to a gif for n seconds
View console2gif.sh
#!/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
View marilyn.py
#!/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 / hurdles.sh
Created Aug 7, 2012
Script que corre por vos en el Doodle de Google
View hurdles.sh
#!/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 / usuarios.py
Created Jul 11, 2012
Traer los usuarios de la DB
View usuarios.py
#!/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 / fuckoff.py
Created Jul 3, 2012
Search tweets in public timeline, filter who uses Foursquare and send to hell.
View fuckoff.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import tweepy
from random import choice
#Twitter Information
CONSUMER_KEY = "asdasdadasdads"
CONSUMER_SECRET="asdasdasdasd"
ACCESS_KEY="asdasdasdasd"
You can’t perform that action at this time.