This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This shell command returns all packages that contain the word camera | |
String command = "pm list packages -f > " | |
+ Environment.getExternalStorageDirectory() + "/packages.txt\n" | |
+ "grep camera " + Environment.getExternalStorageDirectory() | |
+ "/packages.txt\n"; | |
List<String> cameras = new ArrayList<String>(); | |
try { | |
String line; | |
Process process = Runtime.getRuntime().exec("sh"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get install sublime-text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07-30 22:56:25.078 1926-1993/? E/BufferQueue: [FramebufferSurface] dequeueBuffer: min undequeued buffer count (1) exceeded (dequeued=3 undequeudCount=0) | |
07-30 22:56:25.078 1926-1993/? E/: void __egl_platform_dequeue_buffer(egl_surface*):1200 [EGL-ERROR] failed to dequeue buffer from native window (0x41c87010); err = -16, buf = 0x40595b0c | |
07-30 22:56:25.078 1926-1993/? E/BufferQueue: [FramebufferSurface] dequeueBuffer: min undequeued buffer count (1) exceeded (dequeued=3 undequeudCount=0) | |
07-30 22:56:25.078 1926-1993/? E/: void __egl_platform_dequeue_buffer(egl_surface*):1200 [EGL-ERROR] failed to dequeue buffer from native window (0x41c87010); err = -16, buf = 0x40595b04 | |
07-30 22:56:25.078 1926-1993/? E/BufferQueue: [FramebufferSurface] dequeueBuffer: min undequeued buffer count (1) exceeded (dequeued=3 undequeudCount=0) | |
07-30 22:56:25.078 1926-1993/? E/: void __egl_platform_dequeue_buffer(egl_surface*):1200 [EGL-ERROR] failed to dequeue buffer from native window (0x41c87010); err = -16, buf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var server = express(); | |
var port = 8080; | |
server.configure(function(){ | |
server.use('/media', express.static(__dirname + '/media')); | |
server.use(express.static(__dirname + '/public')); | |
}); | |
server.listen(port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys') | |
var exec = require('child_process').exec; | |
function puts(error, stdout, stderr) { | |
sys.puts(stdout) | |
} | |
exec("chmod 644 file.txt", puts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String file = "path/to/the/file.apk"; | |
Intent intent = new Intent( Intent.ACTION_VIEW ); | |
intent.setDataAndType( Uri.fromFile(file), "application/vnd.android.package-archive" ); | |
intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK ); | |
getContext().startActivity(intent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo fs.inotify.max_user_watches=1048576 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm install -g yo grunt-cli bowser generator-angular generator-express generator-heroku generator-chrome-extension generator-cordova |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void enableAppCache(WebView webView) { | |
webView.getSettings().setDomStorageEnabled(true); | |
webView.getSettings().setAppCacheMaxSize(1024*1024*8); // 8mb | |
// Apparemment il y a un bug puisque le path ci-dessous est sensé être le path par défaut | |
// et pourtant, bizarrement, l'AppCache ne fonctionnait pas sans le définir manuellement | |
webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache"); | |
webView.getSettings().setAllowFileAccess(true); | |
webView.getSettings().setAppCacheEnabled(true); | |
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); |
OlderNewer