Skip to content

Instantly share code, notes, and snippets.

@alanfranz
alanfranz / mything
Created February 3, 2011 16:22
mything
class MyClass(object):
pass
@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 / 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 / Procfile
Created October 20, 2011 13:09
Heroku Java Webapp War Deployment
web: sh target/bin/webapp
@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:
@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 / 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 {