Skip to content

Instantly share code, notes, and snippets.

@alanfranz
alanfranz / python_logging_test
Created May 22, 2017 09:27
python timezone information error
#!/usr/bin/env python
import os
import time
# The following is a file in /usr/share/zoneinfo
os.environ["TZ"] = "Europe/Rome"
time.tzset()
import sys
print sys.version_info
@alanfranz
alanfranz / README.txt
Last active August 29, 2015 14:15
HTML Attributes Escaping: you're doing it wrong
See the blog postat
From 4636da988c13325eb1167ca474113711d939969d Mon Sep 17 00:00:00 2001
From: Alan Franzoni <[email protected]>
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 / 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?$")
@alanfranz
alanfranz / TestTransactions.java
Created January 10, 2014 23:29
new mapdb test
package com.mycompany.mapdbtest;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import org.mapdb.TxMaker;
import java.util.Map;
import org.junit.Test;
import org.mapdb.BTreeMap;
@alanfranz
alanfranz / TestTransactions.java
Last active January 2, 2016 20:39
MapDB transaction overlap
package net.emaze.mavenproject1;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import org.mapdb.TxMaker;
import java.util.Map;
import org.junit.Test;
public class TestTransactions {
@alanfranz
alanfranz / tomcat.conf
Last active December 25, 2015 02:29 — forked from witscher/tomcat.conf
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
@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:
@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 / Procfile
Created October 20, 2011 13:09
Heroku Java Webapp War Deployment
web: sh target/bin/webapp