Skip to content

Instantly share code, notes, and snippets.

@regisd
regisd / 90-evoluent.conf
Last active Feb 5, 2018
VerticalMouse3 configuration /usr/share/X11/xorg.conf.d/90-evoluent.conf
View 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 / gmail_senders.py
Created Mar 29, 2015
Gmail - list senders from messages in Gmail
View gmail_senders.py
#!/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 / functions.php
Created May 23, 2012
Wordpress theme "response" by Cyberchimps should use the same RSS in the icon link and alternate link
View functions.php
// 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 Feb 8, 2012
Intent to open the twitter client
View AndroidUtils.java
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 Feb 7, 2012
Android utility method to add a notification
View BaseActivity.java
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;
You can’t perform that action at this time.