Skip to content

Posts from the ‘Life’ Category

31
Oct

Recording lastfm songs with shell-fm

I listen to the last.fm radio all day at the office (it’s a lifesaver
when your workplace has quite a lot noise).

This has one good advantage: I don’t have to bring my music with me.
I dont have to worry about changing groups, nor putting anything into
“shuffle” mode, also, I really like last.fm, is a great service.

But, what happens when your network goes down, or is just too slow?

Here comes to the rescue Shell-fm.

Read moreRead more

26
Feb

Betabeers zaragoza

Estoy organizando el primer evento betabeers en zaragoza, podeis apuntaros aquí

Ven a compartir tus conocimientos y experiencias con nosotros, terminaremos el evento, como siempre, entre cervezas.
Contamos entre nosotros con el taller de Iván Loire sobre Node.js Express.js y Knokout.js!

Programa:

  • - Taller de Node.js Express.js y Knockout.js por Ivan loire
  •  Presentacion de los siguientes proyectos:
  • NumBalls – Informacion social sobre deportistas de elite (Marc de Palol)
  • Focused.es – Focus your tweets (Santiago Montiú)
  • Bilorium – El juego que cambiara el mundo (Diego Marquina)
  • GrassCMS – El CMS que podría utilizar tu madre (Francisco Sanz)

Con la colaboración de:

2
Feb

Installing aircrack-ng from subversion

I recently made a commit into aircrack-ng subversion repository adding an environment variable ready to build “external” scripts like airoscript-ng, airgraph-ng, versuck-ng and airdrop-ng, as well as any other directory inside scripts/ dir wich contains a Makefile.

This has two implications:

  • It’s quite easy to do a package from that (I’m working on an unofficial weekly subversion package)
  • It’s quite easy to install aircrack-ng with sqlite support, all the unstable stuff and the plugins

I’ll explain how to do the last one, in a few single script:

1 2 3 4
apt-get install subversion build-essential libpcap0.8 libssl1.0.0 zlib1g wireless-tools xterm python graphviz macchanger dsniff hydra zenity pyrit sslstrip wkhtmltopdf john libpcap0.8-dev libssl-dev libsqlite3-dev libnl-dev
svn co http://trac.aircrack-ng.org/trunk/
make -C trunk unstable=true ext_scripts=true sqlite=true
make -C trunk install unstable=true ext_scripts=true sqlite=true

Et voilá, you execute that as root, it will get lastest aircrack-ng revision and dependences (and most of airoscript-ng ones, all the necesary and packaged).

20
Jan

Bringing back old flash /tmp files!

I recently wrote a script for playing files on recent browsers with mplayer, a friend asked me if could bring the old system back… so here I did it, each time you execute this script you’ll have your current playing videos linked again in /tmp with their old names:

for i in $(pgrep -f flash); do file /proc/$i/fd/*|awk '/Flash/{ gsub(/`/, ""); gsub(/:/, ""); system("ln -s " $1 " " $6); }'; done
5
Jan

Adding socks5 support to python-irclib

I was playing with IRC and Proxyes a few weeks ago, and I found out that python’s irclib didn’t support them!
It took me like a minute or so to fix it, just overloading socket with socksocket, you can have a look at my fork in github

        try:
            import socks, os
            socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5,
                os.getenv('proxy_addr'), os.getenv('proxy_port'))
            socket.socket = socks.socksocket
        except:
            pass

So, basically I try importing socks and setting up a default proxy, socks5 (sorry, I haven’t considered socks4 on there), with the environment variables proxy_addr and proxy_port as addr and port.

To use it, you’ll have to get a libirc-based application (there’s a bot included that might be a start) and, before starting it, define proxy_addr and proxy_port

proxy_addr=127.0.0.1; proxy_port=1080; python my_python-irclib_based_foo

Enjoy =)

28
Dec

Playing temporary files with mplayer on Flash 11

Back in the times of Flash Player 10 we could do an mplayer /tmp/Flash*. You could use mplayer on your flash videos, or even download them! Sadly, Adobe realized that, and fixed it.

But it’s still posible! Basically, each process has a list in /proc of all the File Descriptors it has opened, between them we’ll find our flv file.
More concisely, It will reside on /proc/_PID_/fd where PID is the process id, and will be a symbolic link, pointing to /tmp/FlashXXX
You’ve read right, points to /tmp/FlashXXX as the old ones, so we can just list it and filter by that name

Save or play your youtube, megavideo, daylimotion and many more flash videos on linux!

I first tried listing all files in /proc/*/fd but that was slow as hell, so I filtered out (thanks to pgrep) the ones matching all full processes containing “flash” (should work on firefox and chrome at least) in their full call.

for i in $(pgrep -f flash); do file /proc/$i/fd/*|awk '/tmp/Flash/ { gsub(/:/, ""); print $1 }'; done

You can now just use that files with mplayer!

I, personally, have buggy speakers and use it for manually increasing the volume output with softvol switch (forcing a software volume mixing)

mplayer -fs -zoom -idx -softvol -softvol-max 10000 -volume 5000 `for i in $(pgrep -f flash); do file /proc/$i/fd/*|awk '/tmp/Flash/ { gsub(/:/, ""); print $1 }'; done`

 

12
Dec

Vim workshop at downgrade hackerspace.

This evening in zaragoza we were assisting at the VIM Workshop organished by the downgrade hackerspace. I was (supposedly) one of the speackers, even tough I didn’t have in mind any kind of speech. I planned it as a de-centralized workshop, but people seemed to not understand that.

Thanks god that meskio was there, to use his social habilities to get things started. It ended up being a producitve workshop, were all of us gained some vim knowledge. I learned some curious tricks, and the vim local_vimrc plugin, wich allows you to have nested vimrc files.

After all this workshop installing and messing with plugins and pathogen, I came up with yet another vim configuration starter, wich you can find here. This script will (remember to clean your env first) install pathogen, configure it and install nerdtree, conqueshell and VimBlog in bundles dir.

It’s basically a five-liner, wich will end up with a pathogen-enabled .vim directory and a few useful plugins, wich can be configured:

plugins=( "The-NERD-tree" "Conque-Shell" "vimblog.vim" )
wget -nd -P .vim/autoload https://github.com/vim-scripts/pathogen.vim/raw/master/plugin/pathogen.vim
wget http://lh-vim.googlecode.com/svn/misc/trunk/plugin/local_vimrc.vim -nd -P .vim/bundle/local_vimrc/plugin/
grep 'call pathogen#infect()' ~/.vimrc || { echo -e "ncall pathogen#infect()nlet g:local_vimrc=".vimrc"n" >> ~/.vimrc; }
cd .vim/bundle && for i in ${plugins[@]}; do git clone https://github.com/vim-scripts/$i; done
12
Dec

Presentando MySocialStickers

Pegatinas de mis seguidores, con el nick y la imagen de perfil.

Pegatinas de mis seguidores, con el nick y la imagen de perfil.

Presentación

Presentamos MySocialStickers, tu nueva aplicación imprescindible para organizar eventos.

Con MySocialStickers puedes generar identificaciones para los asistentes a un evento basadas en información de twitter

Incluso puedes hacer tus propias tarjetas de visita!

Fuentes de datos

Twitter! De momento MySocialStickers soporta unicamente generar pegatinas en base a twitter. Puedes elejir entre las siguientes fuentes de datos:

  • Listas: Organiza eventos de la forma más sencilla
  • Seguidores: ¿Quieres organizar un evento y tienes una cuenta de twitter especifica para ello?
  • Amigos: ¡Regala MySocialStickers a tus amigos!
  • Busquedas: ¿Quieres algo de acción social? ¡Así nacio la idea de MySocialStickers!
  • Tu mismo: Presentate de la mejor manera posible.

Personaliza tus tarjetas o tus pegatinas!

Elije entre distintos tamaños predeterminados o inventa tu propio tamaño para tus MySocialStickers. Cambia el color, elije entre QR Code e imagen de perfil, nick o nombre real, puedes darle mil utilidades con cada opcion

Pegatinas sobre ti mismo, con el nick y un código QR

Pegatinas sobre ti mismo, con el nick y un código QR

Lo estrenaremos para el Salón del Comic de zaragoza, en el que, a cualquiera que lo pida via twitter con el hashtag #MySocialStickers, le entregaremos (en persona, pedidlas sólo si vais a venir) su pegatina con codigo QR completamente gratis!

 

Read moreRead more

27
Nov

Managing android virtual machines the CLI way

In a previous post, I were explaining how to generate android packages using a script I made.

I’ve recently upgraded that script so that we don’t have to create any virtual machines, if there is not a virtual machine with the name of the pacakge we’re doing, It’ll automagically create one!

It’s basically using “android” tool from android sdk, with the avd parameters, wich are:

  • list avd : Lists existing Android Virtual Devices.
  • create avd: Creates a new Android Virtual Device.
  • move avd: Moves or renames an Android Virtual Device.
  • delete avd: Deletes an Android Virtual Device.
  • update avd: Updates an Android Virtual Device to match the folders
17
Nov

Biibot, a bash bot based on II

I was on the IRC channel #debian-es-cachondeo yesterday, talking with @Kumul about II and his rc-based bot and I decided to show him the power of bash. In a few minutes I uploaded to my github a first version of what I think is a nice bot, configurable and scalable, with no useful features… But you can add your own!

First of all, let’s see what it does:

  • Manage multiple servers with independent channels
  • Enable-disable commands at runtime
  • Nice configuration file
  • Admin user ACL
  • Process management
Nice features for a 15 minutes made irc bot, aren’t they? =)
It manages multiple servers’ channels in a tricky manner. I’m going to lose a few moments trying to explain briefly this.