System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
##list vms | |
vboxmanage list vms | |
##enumerate genymotion properties for vm | |
vboxmanage guestproperty enumerate "INSERT_VMNAME" | |
##set property | |
vboxmanage guestproperty set "INSERT_VMNAME" "INSERT_PROPERTYNAME" "VALUE" | |
##rooted genymotion by default (No superuser) |
/** | |
* Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable). | |
* In the ghost bitmap, the RGB values take on the values from the 'color' argument, while | |
* the alpha values are derived from the source's grayscaled RGB values. The effect is that | |
* you can see through darker parts of the source bitmap, while lighter parts show up as | |
* the given color. The 'invert' argument inverts the computation of alpha values, and looks | |
* best when the given color is a dark. | |
*/ | |
private Bitmap createGhostIcon(Drawable src, int color, boolean invert) { | |
int width = src.getIntrinsicWidth(); |
import os | |
from os.path import join | |
def remEmptyDir(mypath): | |
ignore_files = ['Folder.jpg', 'albumart.pamp'] | |
for root, dirs, files in os.walk(mypath, topdown=False): | |
for name in dirs: | |
fname = join(root, name) |
from fabric.api import * | |
import os | |
import fabric.contrib.project as project | |
# Local path configuration (can be absolute or relative to fabfile) | |
env.theme = 'themes/your-theme' | |
env.deploy_path = '/absolute/path/for/generated/output' | |
# Remote server configuration | |
prod = 'username@server.example.com:22' |
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
pyserver() { | |
// SMooth Scroll without lag | |
listView.postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
listView.smoothScrollToPosition(position); | |
} | |
}, 600); |
// By Sorrodos | |
// http://stackoverflow.com/a/5188171/984466 | |
/** | |
* Use this method to scale a bitmap and give it specific rounded corners. | |
* @param context Context object used to ascertain display density. | |
* @param bitmap The original bitmap that will be scaled and have rounded corners applied to it. | |
* @param upperLeft Corner radius for upper left. | |
* @param upperRight Corner radius for upper right. | |
* @param lowerRight Corner radius for lower right. | |
* @param lowerLeft Corner radius for lower left. |