Skip to content

Instantly share code, notes, and snippets.

View luigisaggese's full-sized avatar

Luigi Saggese luigisaggese

  • Swatch Group
  • Switzerland
View GitHub Profile
@luigisaggese
luigisaggese / AppDelegate.cs
Last active October 24, 2017 14:30
PushNotification Localytics
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using Facebook.CoreKit;
using Firebase.Core;
using Firebase.DynamicLinks;
using Foundation;
using Google.MobileAds;
@luigisaggese
luigisaggese / script.sql
Created July 3, 2014 08:20
Unused index
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
@luigisaggese
luigisaggese / PulsingHaloLayer
Created June 11, 2014 10:52
PulsingHaloLayer for pierceboggan
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.CoreAnimation;
using System.Drawing;
using System.Threading.Tasks;
namespace PulsingHaloLayer
@luigisaggese
luigisaggese / gist:7228772
Created October 30, 2013 08:05
Table and search for fulltext
CREATE TABLE tsv_table (
email varchar(500),
what varchar(4096),
tsv tsvector
)
WITH (OIDS=FALSE)
;
CREATE INDEX ix_tsv_table_what ON tsv_table USING gin (tsv);
@luigisaggese
luigisaggese / gist:6649099
Created September 21, 2013 10:05
Environment Xamarin
=== Xamarin Studio ===
Version 4.0.12 (build 3)
Installation UUID: e9ccd140-6f55-4fc1-8d93-e96912bf1ed5
Runtime:
Mono 3.2.0 ((no/7c7fcc7)
GTK 2.24.20
GTK# (2.12.0.0)
Package version: 302000000
D/AndroidRuntime( 3508):
D/AndroidRuntime( 3508): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 3508): CheckJNI is ON
D/dalvikvm( 3508): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 3508): Added shared lib libjavacore.so 0x0
D/dalvikvm( 3508): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 3508): Added shared lib libnativehelper.so 0x0
D/AndroidRuntime( 3508): Calling main entry com.android.commands.am.Am
D/AndroidRuntime( 3508): Shutting down VM
var json = new Cirrious.MvvmCross.Plugins.Json.MvxJsonConverter();
var client = new Cirrious.MvvmCross.Plugins.Network.Rest.MvxJsonRestClient
{
JsonConverterProvider = () => json
};
var request = new MvxRestRequest(address);
request.CookieContainer = new CookieContainer();
CookieCollection cc = new CookieCollection();
cc.Add(new Cookie("JE", "01*YZXv5AFHpSAQiMh992BCikUgAiMFq7GK9jxX95wm/uTWC7sXOONp3LFoT6pLriI0yILcrPQr4ydq4C2kdPoLYbmKgBa3kFWdlMzXztdaCyi8RaCd1P8rPtnBIYZR+0D3+hgyNQ3TOrEVvgyaHdoJfGO29fZWWGWT7frWEc5udL5yARsyozxZg1T8ILyaOHg/1qBcwRlcPynIel6bqtqDJu3qWyBwYlyFVPsudNlWF3HHHBT4aoQeiCP/cMoLX6RePhtsDJw2vUdtIP0qTKWZZC90900c8zt7WIZdTJaUuiVdqjsIMMHRtVdZPY+3PUea1dP7wkrysqzyMawvxzslL5n45OIxGeAAxKSm2NW0BDgtWvFXZXAxnSGnN8wViq2MV8iK38ah/ATO0L/gSOwloh0B7y8OWJEWE4pmm5TsEg0NqCgOY7bEs8r/cUgkGVou+Bu5ng19UzApw+tXG1smANKsCb9nvj6faKXcHn8OhGLdBhPkyIt56jZXMEmQnt4z8d8Y1MpaAE+rmHH02sbjwGJicMqNfLUUVkqlMbR/i6qADrAZti0O7lrwX+YyE2mYw4//