Skip to content

Instantly share code, notes, and snippets.

Luca CPZ lcpz

Block or report user

Report or block lcpz

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
lcpz / get_secret.lua
Created Nov 24, 2018
Example of password retrieval function for lain IMAP widget -
View get_secret.lua
-- Source:
local Gio = require("lgi").Gio
local GLib = require("lgi").GLib
local function get_secret(attrs)
local bus = Gio.bus_get_sync(Gio.BusType.SESSION, nil)
local name = "org.freedesktop.secrets"
local object = "/org/freedesktop/secrets"
local interface = "org.freedesktop.Secret.Service"
lcpz /
Last active Apr 12, 2019
Sardinas-Patterson algorithm
#! /usr/bin/env python
# Copyright 2015 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
lcpz / mpd-fade
Created Feb 26, 2017
A script to fade volume when toggling MPD via mpc
View mpd-fade
# A script to fade volume when toggling MPD via mpc
mpc=`which mpc`
# volume commands, customize here
decrease="amixer -q set Master 1%-"
increase="amixer -q set Master 1%+"
lcpz / ros-indigo-source-install-arch.txt
Last active Jul 14, 2019
How to install ROS Indigo desktop under Arch Linux
View ros-indigo-source-install-arch.txt
0. ros-indigo uses python 2, while arch uses version 3: if experiencing any python issue, first of all try changing cmakelists to use python2 enviroment
1. follow the guide until section 2.1.2
2. pacman -S gtest graphviz boost eigen tinyxml apr-util qt4 opencv qhull assimp ogre yaml-cpp python2-pip python-pip python2-coverage python2-nose python2-sip python2-pyqt4 python2-pyside python2-shiboken
3. sudo pip2 install pygraphviz netifaces
4. sudo pip install rospkg catkin_pkg
5. from AUR, install: poco console-bridge urdfdom urdfdom-headers collada-dom log4cxx (maybe better to install console-bridge from git:
6. sudo ln -s /usb/bin/qmake-qt4 ~/bin/qmake # provided that ~/bin is present in $PATH
7. set python2 as env in catkin_make_isolated script
8. change collada_dom version from 2.3 to 2.4 (or whatever the current version is) in ~/catkin_ws/src/robot_model/collada_{parser,urdf}/CMakeLists.txt
9. build like this:
lcpz /
Created Aug 20, 2016
PDF/A-1b validator
* Source:
* Compilation:
* $ javac -cp preflight-app-$VERSION.jar:.
* Usage:
* $ java -cp preflight.jar-app-$VERSION:. Validator input.pdf
lcpz / fbOntology.owl
Last active Jun 5, 2016
A Facebook ontology. Written in Protégé 5.0.0 and tested consistent with FaCT++ 1.6.4 reasoner.
View fbOntology.owl
<?xml version="1.0"?>
<rdf:RDF xmlns=""
<owl:Ontology rdf:about=""/>
lcpz / ticks.c
Last active Jan 7, 2017
A simple program for monitoring lain performances -
View ticks.c
compile: gcc -o ticks ticks.c
run: ./ticks $(pgrep awesome) 20 3
This makes 3 measurements of each 20 seconds
Best used with short timeouts in the widgets and everything else idling.
View uselesstile.lua
Licensed under GNU General Public License v2
* (c) 2015, InfinityTotality
* (c) 2014, projektile, worron
* (c) 2013, Luke Bonham
* (c) 2009, Donald Ephraim Curtis
* (c) 2008, Julien Danjolu
lcpz / uselesstile.lua
Last active Apr 10, 2018
Make uselesstile internal gaps two times wider, like xmonad.
View uselesstile.lua
Licensed under GNU General Public License v2
* (c) 2014 projektile, worron
* (c) 2013 Luke Bonham
* (c) 2009 Donald Ephraim Curtis
* (c) 2008 Julien Danjolu
With gaps between windows two times wider
(like xmonad)
You can’t perform that action at this time.