Skip to content

Instantly share code, notes, and snippets.

View chris-piekarski's full-sized avatar

Christopher Piekarski chris-piekarski

  • Boulder, CO
  • 05:07 (UTC)
View GitHub Profile
@chris-piekarski
chris-piekarski / rvm_dump
Last active October 11, 2015 18:48
Ruby RVM Info Dump: ( set -x ; cd dir ) Output
+ cd current
+ builtin cd current
+ [[ -n '' ]]
+ true
+ __rvm_do_with_env_before
+ [[ -n '' ]]
+ [[ -n /usr/local/rvm ]]
+ source /usr/local/rvm/scripts/initialize
++ : rvm_trace_flag:0
++ (( rvm_trace_flag > 0 ))
@chris-piekarski
chris-piekarski / repo_forall_path_example
Last active May 28, 2019 16:25
List remote project and local paths using Android repo script.
repo forall -c 'echo $REPO_PROJECT $REPO_PATH'
platform/abi/cpp abi/cpp
platform/bionic bionic
device/fsl/bootloader/uboot bootable/bootloader/uboot-imx
platform/bootable/recovery bootable/recovery
platform/build build
platform/cts cts
platform/dalvik dalvik
#set lots of bash shell ls colors
wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/.dircolors
echo 'eval $(dircolors -b $HOME/.dircolors)' >> $HOME/.bashrc
. $HOME/.bashrc
#To set if it was setup correctly
dircolors -p
@chris-piekarski
chris-piekarski / dropbox monitor
Created February 3, 2013 05:31
Fix dropbox Ubuntu monitor error.
echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches
@chris-piekarski
chris-piekarski / create_gerrit_branch
Last active December 12, 2015 08:08
Create Gerrit branch from AOSP mirror
repo init -u git://server/manifest -b <tag> android-4.1.2_r1
repo sync
repo forall -c 'git branch company/branchname"
repo forall -c 'git checkout company/branchname"
repo forall -c 'git push ssh://cpiekarski@server:29418/$REPO_PROJECT company/branchname:company/branchname'
@chris-piekarski
chris-piekarski / android_apk_location
Last active December 13, 2015 16:48
Get Android package (app) apk location
$ adb shell pm list packages -f | grep com.occipital.panorama
package:/data/app-private/com.occipital.panorama-2.apk=com.occipital.panorama
$ adb pull /data/app-private/com.occipital.panorama-2.apk ~/tmp
@chris-piekarski
chris-piekarski / ruby_twitter_crunch
Last active December 14, 2015 01:59
Ruby Twitter Crunch It Steps
> redis-server
> vi ./examples/Rakefile
@app_token = ''
@app_secret = ''
@user_accounts = {:name_one => { :token => '',
:secret => '',
:filter => ['cubs', '#baseball']},
@chris-piekarski
chris-piekarski / compile_off_proc_cpuinfo
Created February 26, 2013 00:00
Record build time and multiprocess build for machine type
# record build time and multiprocess build for machine
time make -j$(egrep '^processor' /proc/cpuinfo | wc -l) 2>&1 | tee my_make.out
@chris-piekarski
chris-piekarski / git log alias
Last active December 14, 2015 21:49
Git log alias & GitStats HTML Output
#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
@chris-piekarski
chris-piekarski / add_new_android_permission
Created March 19, 2013 19:53
Add new permissions to Android platform.
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. -->