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
# record build time and multiprocess build for machine | |
time make -j$(egrep '^processor' /proc/cpuinfo | wc -l) 2>&1 | tee my_make.out |
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
#http://www.jukie.net/bart/blog/pimping-out-git-log | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" | |
#other git log commands | |
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short | |
#see short changes for a commit id | |
git diff --stat b78c27ee675356a309cb5d0e3edf1462e1764a44 |
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
To add a new permission to Android modify the frameworks/base/core/res/AndroidManifest.xml file. Make sure you add the strings too. After rebuilding check that the api/current.txt file was updated to include the new permissions. | |
<!-- Allows an application to write the company system settings. --> | |
<permission android:name="android.permission.WRITE_COMPANY_SETTINGS" | |
android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS" | |
android:protectionLevel="signature|system|development" | |
android:label="@string/permlab_writeCompanySettings" | |
android:description="@string/permdesc_writeCompanySettings" /> | |
<!-- Allows an application to read the company system settings. --> |
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
Manifest: | |
<manifest package="com.package" | |
android:sharedUserId="android.uid.system" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools"> | |
Android.mk: | |
LOCAL_CERTIFICATE := platform |
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
C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini | |
Replace | |
hw.ramSize=1024 | |
by | |
hw.ramSize=1024MB | |
Also, if you're seeing apps killed because of low memory increase VM Heap size to 64 |
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
python setup.py sdist --formats=gztar,zip | |
python setup.py sdist upload | |
Check/Add .pypirc file under user home dir ~/.pypirc | |
[distutils] | |
index-servers = | |
pypi | |
[pypi] |
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
frameworks/base/core/res/res/values/config.xml | |
<!-- This string array should be overridden by the device to present a list of network | |
attributes. This is used by the connectivity manager to decide which networks can coexist | |
based on the hardware --> | |
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx], | |
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> | |
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay | |
before automatically restore the default connection. Set -1 if the connection |
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
Need to flush out: | |
git checkout chrischanges | |
git pull https://tinfoil.blah.com/gerrit/platform/packages/apps/Settings refs/changes/12/112/1 | |
git add src/com/blah/blah/Utils.java | |
git commit -a | |
git rebase --continue | |
git add src/com/blah/blah/Utils.java | |
git push ssh://cpiekarski@tinfoil.blah.com:29418/platform/packages/apps/Settings chrischanges:refs/for/balh/android-4.1.2_r1 |
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
Will work once: | |
nc -l 0.0.0.0 6127 | |
nc -l 6126 | nc 0.0.0.0 6127 | |
wget http://0.0.0.0:6126 | |
First 'nc -l' should hit. |
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
#CalledFromWrongThreadException | |
#Views can only be executed on by the thread that created them. If your in a different thread you have to use | |
#the runOnUiThread method. | |
runOnUiThread(new Runnable() { | |
public void run() { | |
//stuff that updates ui | |
} |