Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@regisd
regisd / gmail_senders.py
Created March 29, 2015 12:33
Gmail - list senders from messages in Gmail
#!/usr/bin/python
import argparse
import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
@regisd
regisd / 90-evoluent.conf
Last active March 26, 2022 13:23
VerticalMouse3 configuration /usr/share/X11/xorg.conf.d/90-evoluent.conf
Section "InputClass"
Identifier "Evoluent VerticalMouse 3"
MatchProduct "Evoluent VerticalMouse 3"
Option "ButtonMapping" "1 9 2 4 5 6 7 3 8"
EndSection
@regisd
regisd / functions.php
Created May 23, 2012 00:10
Wordpress theme "response" by Cyberchimps should use the same RSS in the icon link and alternate link
// add this function in functions.php
/** Replaces RSS link from HTML 'head' with custom feed also used with the 'social icon' */
function response_feed_links() {
global $themename, $themeslug, $options;
$my_feed=$options->get($themeslug.'_rsslink');
if ($my_feed) {
echo '<link rel="alternate" type="application/rss+xml" title="RSS feed" href="'.$my_feed.'"/>';
}
else {
@regisd
regisd / AndroidUtils.java
Created February 8, 2012 21:06
Intent to open the twitter client
public Intent findTwitterClient() {
final String[] twitterApps = {
// package // name - nb installs (thousands)
"com.twitter.android", // official - 10 000
"com.twidroid", // twidroyd - 5 000
"com.handmark.tweetcaster", // Tweecaster - 5 000
"com.thedeck.android" // TweetDeck - 5 000 };
Intent tweetIntent = new Intent();
tweetIntent.setType("text/plain");
final PackageManager packageManager = getPackageManager();
@regisd
regisd / BaseActivity.java
Created February 7, 2012 23:08
Android utility method to add a notification
package info.decamps.droid.demo;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.app.Activity;