Skip to content

Instantly share code, notes, and snippets.

@CedricGatay
CedricGatay / install_vagrant_sudoers.sh
Last active August 29, 2015 13:55 — forked from GUI/install_vagrant_sudoers.sh
Script for placing sudoers.d files with syntax-checking, from https://gist.github.com/GUI/2864683, adapted to work with Vagrant 1.4.x under OS X / Linux
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# From https://gist.github.com/GUI/2864683, adapted to work
# with Vagrant 1.4.x under OS X / Linux
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers.XXX)
cat /etc/sudoers > $TMP
# Does not reedit file
@CedricGatay
CedricGatay / gist:10872358
Created April 16, 2014 13:11
distassembly
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>ui-dist</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>

Keybase proof

I hereby claim:

  • I am CedricGatay on github.
  • I am cedricgatay (https://keybase.io/cedricgatay) on keybase.
  • I have a public key whose fingerprint is 8093 1796 FBFE 2411 B963 2CBD 44FA BF6E 6113 22F8

To claim this, I am signing this object:

@CedricGatay
CedricGatay / strip_play_services.gradle
Last active August 29, 2015 14:09 — forked from dmarcato/strip_play_services.gradle
Keep track of previous run to prevent restripping if nothing has changed
// adapted from https://gist.github.com/dmarcato/d7c91b94214acd936e42
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
@CedricGatay
CedricGatay / gist:055877128a3bf554f3f6
Created February 26, 2015 09:09
gcm-repository-maven-fragment.xml
<repositories>
<repository>
<id>gcm-server-repository</id>
<url>https://github.com/slorber/gcm-server-repository/raw/master/releases/</url>
</repository>
</repositories>
@CedricGatay
CedricGatay / 85-typematrix.rules
Created September 1, 2015 12:03
Colemak via udev
ACTION=="add", ATTR{idVendor}=="1e54", ATTR{idProduct}=="2030", RUN+="/usr/local/bin/set_typematrix_colemak_mapping"
private static final String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
private void registerForBroadcasts() {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(ACTION_CLOSE_SYSTEM_DIALOGS);
registerReceiver(mReceiver, intentFilter);
}
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
SUPL_HOST=supl.google.com
SUPL_PORT=7276
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=1
[13:51]cgatay@local:...ce.perso/Camera/Camera$ git diff -i HEAD^
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index f0d38af..feb48b2 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -1911,7 +1911,8 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
updateCameraParametersPreference();
}
}
-
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index c335b02..2bad6dc 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -26,22 +26,22 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
import android.database.Cursor;