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
wget -S -O - http://this/is/a/url |
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 /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
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
android { | |
signingConfigs { | |
release | |
} | |
buildTypes { | |
release { | |
signingConfig signingConfigs.release | |
} |
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
Use repo to intitalize different branches | |
$ mkdir /repos/aosp-1.6_r1 | |
$ cd /repos/aosp-1.6_r1 | |
$ repo init -b android-1.6_r1 -u https://android.googlesource.com/platform/manifest --reference=/repos/aosp-main | |
$ repo sync | |
Switch to another branch | |
$ mkdir /repos/aosp-1.6_r2 |
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
# Assume in.pdf has 100 pages | |
pdftk in.pdf cat 100-1 output out.pdf |
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
#include <cstdio> | |
#include <iostream> | |
#include <bitset> | |
#include <cstring> | |
#include <limits> | |
int main(int argc, char** argv) | |
{ | |
const int n = atoi(argv[1]); |
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
# Open Terminal and enter, | |
# Replace 2 with a number between 0 and 3. | |
# 0: Light | |
# 1: Standard | |
# 2: Medium | |
# 3: Bold | |
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2 |
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
// If no resource for the given package exists, this package is not installed in the phone | |
try { | |
mGenieResources = getPackageManager().getResourcesForApplication(GENIE_PACKAGE_ID); | |
} catch (PackageManager.NameNotFoundException e) { | |
// no weather info available | |
Log.w(LOG_TAG, "Can't find "+GENIE_PACKAGE_ID+". Weather forecast will not be available."); | |
} |
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
# build specified package and transfer it to the connected emulator/device. | |
function fsnod { | |
mmm -j6 frameworks/base frameworks/base/core/res snod | |
adb shell stop | |
adb sync | |
adb shell start | |
} |
OlderNewer