Skip to content

Instantly share code, notes, and snippets.

View gipi's full-sized avatar
😎
code for food

Gianluca Pacchiella gipi

😎
code for food
View GitHub Profile
@gipi
gipi / gist:1442352
Last active September 28, 2015 12:58
Android: strike through text
import android.widget.TextView;
import android.text.SpannableString;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.graphics.Typeface;
String off_money_discounted = "50€";
SpannableString discounted = new SpannableString(off_money_discounted);
@gipi
gipi / MyMapConverter.java
Created December 14, 2011 10:11
Java: using custom converter that maps an XML in a Map using an attribute as key.
package com.example.android;
import com.thoughtworks.xstream.*;
import com.thoughtworks.xstream.io.*;
import com.thoughtworks.xstream.mapper.*;
import com.thoughtworks.xstream.converters.*;
import com.thoughtworks.xstream.converters.collections.*;
import java.util.*;
@gipi
gipi / gist:1506702
Last active September 28, 2015 22:38
#unix
@gipi
gipi / 000.md
Last active September 29, 2015 00:38
#database #sql #postgres #mysql #sqlite
@gipi
gipi / roundcube
Created December 28, 2011 10:49
ROUNDCUBE: Init script for PHP CGI and nginx configuration file.
#!/bin/sh
### BEGIN INIT INFO
# Provides: php-cgi
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Make available a cgi for nginx
# Description: primarly is used for the wordpress installation
### END INIT INFO
@gipi
gipi / 000.md
Last active June 3, 2019 12:47
#debian #package: notes about building packages.

The dependencies needed for build package from source are

# sudo apt-get install build-essential fakeroot devscripts dpatch dh-make expect

to build a package obviously you need the source and its dependencies

$ apt-get source blender
# apt-get build-dep blender

and finally you can build it