Skip to content

Instantly share code, notes, and snippets.

@alanfranz
alanfranz / find_apache_tomcat7_latest.py
Last active August 29, 2015 14:06
Apache Tomcat 7 latest version with puppet.
#!/usr/bin/env python
# add as fact, drop this into /etc/facter/facts.d/
# requires python with lxml installed,(usually a python-lxml package is available in most distributions)
from lxml.etree import HTML
import re
import sys
import urllib
pattern = re.compile("^7\.0\.\d\d\d?$")
From 4636da988c13325eb1167ca474113711d939969d Mon Sep 17 00:00:00 2001
From: Alan Franzoni <username@franzoni.eu>
Date: Sun, 23 Nov 2014 22:02:26 +0100
Subject: [PATCH] Fix: don't stumble with source directories permissions - see
#807
---
lib/fpm/package.rb | 2 +-
lib/fpm/package/dir.rb | 16 ++++++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
@alanfranz
alanfranz / README.txt
Last active August 29, 2015 14:15
HTML Attributes Escaping: you're doing it wrong
See the blog postat
@alanfranz
alanfranz / idea_add_agent.sh
Created February 3, 2011 16:30
Pycharm and Rubymine launcher with agent support
#!/bin/bash
sed -i.orig -e 's|$IDEA_JDK/bin/java $JVM_ARGS|$IDEA_JDK/bin/java -javaagent:agent.jar=IDEA $JVM_ARGS|' idea.sh
@alanfranz
alanfranz / idea.desktop
Created February 3, 2011 16:32
Pycharm Desktop Entry
[Desktop Entry]
Encoding=UTF-8
Name=IDEA
Exec=PATH_TO_IDEA_DIR/bin/idea.sh
Icon=PATH_TO_IDEA_DIR/bin/idea_CE128.png
Type=Application
Categories=Development;
StartupWMClass=IDEA
@alanfranz
alanfranz / mything
Created February 3, 2011 16:22
mything
class MyClass(object):
pass
@alanfranz
alanfranz / buildout.cfg
Created March 14, 2011 17:08
zc.buildout twisted trial test runner
[trialtest]
recipe = zc.recipe.egg:scripts
eggs = Twisted>=<required_version_here>
<your_develop_distribution_here>
entry-points = trial=twisted.scripts.trial:run
initialization = import sys; sys.argv[1:] or sys.argv.insert(1, "<your_distro_test_package>")
@alanfranz
alanfranz / twisted_protocol_test.py
Created April 26, 2011 10:37
Twisted Protocol unit test
from twisted.trial.unittest import TestCase
from twisted.test.proto_helpers import StringTransportWithDisconnection
from twisted.internet.protocol import Factory
from somepackage.someprotocol import SomeProtocol
class MockFactory(Factory):
pass
class TestSomeProtocol(TestCase):
@alanfranz
alanfranz / topics.md
Last active December 16, 2015 19:29
I want topics on social networks.

Really. I think social networks - ALL social networks - need a topic/channel/directory feature.

No, tags don't work, nor do circles or list. Google+ and/or Facebook pages work somewhat better, but they're designed for a different purpose - posting on the behalf of 'entities'.

Let me explain: I am a human, my name is Alan Franzoni, and I sometimes want to share with the world my thoughts about something. I often discuss software development, and I've got a Twitter account and a blog which I've setup for discussing such topic; there I write in English for a worldwide audience. I sometimes go a bit astray, but I try to keep mostly focused on such topics there; I've got a separate blog where I collect Linux/OSX/Unix related tips and tricks that don't really fit in the wider software development audience.

I've got a Facebook account as well, where I write in Italian, which I mostly use

@alanfranz
alanfranz / heimdall_first_run.log
Created July 29, 2013 11:22
Heimdall 1.4.0 Ubuntu 12.04 64 bit with libusbx 1.0.16 two runs of: ./heimdall print-pit --verbose --no-reboot --usb-log-level debug
Heimdall v1.4.0
Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating: