Skip to content

Instantly share code, notes, and snippets.

View pblocz's full-sized avatar

Pablo Cabeza García pblocz

  • Elastacloud
  • London
View GitHub Profile
@pblocz
pblocz / cv-autologin.user.js
Last active August 29, 2015 14:11
To login automatically into UCM unified login
/*! cv-autologin.user.js v1.0 | (c) 2014 Pablo Cabeza | MIT license: http://opensource.org/licenses/mit-license.php */
// ==UserScript==
// @name cv-autologin
// @namespace https://gist.github.com/2b50eaf5e4912cbf8d35
// @version 1.0
// @description To login automatically into UCM unified login
// @author Pablo Cabeza
// @include https://sso.ucm.es/simplesaml/module.php/userpasswordcaptcha/loginuserpass.php*
// @include http://www.ucm.es/campusvirtual*
@pblocz
pblocz / git-big-files
Created May 26, 2015 22:48
Script to do some housekeeping of big or sensitive files and erase from repository history
#!/usr/bin/env python
# coding=utf-8
'''
git-big-files | (c) 2015 Pablo Cabeza
license: [modified BSD](http://opensource.org/licenses/BSD-3-Clause)
Script to do some housekeeping of big or sensitive files and erase
from repository history
'''
@pblocz
pblocz / canto-curses-notify-plugin.py
Last active June 18, 2016 13:31
canto-curses notification plugin
'''
canto-curses-notify v0.3 | Copyright (c) 2015, Pablo Cabeza
MIT Licese (http://opensource.org/licenses/mit-license.php)
Notification plugin for
[canto-curses](https://github.com/themoken/canto-curses) that
integrates with desktop notifications. See [Canto
webpage](http://codezen.org/canto-ng/) for more info.
@pblocz
pblocz / banshee-beets-sync.py
Last active March 6, 2017 03:01
script that updates track ratings in banshee database from beet favorite songs
#! /usr/bin/env python
'''
Script that syncs beet favorites with banshee.
'''
import click
from beets import library
import os
@pblocz
pblocz / audacious-sync.py
Last active March 6, 2017 03:03
Script that syncs a playlist (m3u) with current audacious playlist.
#! /usr/bin/env python
'''
Script that syncs a playlist (m3u) with current audacious playlist.
'''
import click
import os
import shlex
import subprocess as sp
@pblocz
pblocz / .vimrc
Last active October 17, 2017 22:08
"
" 0. configure proxy:
" git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
" 1. Download and install vim-plug
"
" 2. Do a :PlugInstall
"
" 3. If command-t not working try `rake make` from its folder
" if not in path, install it with
" export HTTP_PROXY=<proxy>; gem install --local rake
import functools
import click
class Command:
def __init__(self, f, args, kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
self.cmd = click.command(*args, **kwargs)(f)
@pblocz
pblocz / redirect-microsoft
Created January 21, 2019 17:17
Redirect to english Microsoft docs
// ==UserScript==
// @name redict-microsoft
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Redirect to english Microsoft docs
// @author Pablo Cabeza Garcia
// @match https://*.microsoft.com/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Open week view in zoho
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://people.zoho.com/*/zp
// @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js
// @grant unsafeWindow
// ==/UserScript==
@pblocz
pblocz / ELPRank.user.js
Last active December 11, 2019 21:53
Tampermonkey script to find UCM ELP Sakai forums posts ranking, use from *forums* tab, or else it won't work
/*! ELPRank.user.js v1.3 | (c) 2014 Pablo Cabeza
* license: http://opensource.org/licenses/mit-license.php
*/
// ==UserScript==
// @name ELPRank
// @namespace https://gist.github.com/43dc185975386ab5eedf
// @version 1.3
// @description To find UCM ELP Sakai forum posts ranking, use from *forums* tab, or else it won't work
// @author Pablo Cabeza