Skip to content

Instantly share code, notes, and snippets.


Christopher Piekarski chris-piekarski

View GitHub Profile
chris-piekarski / rvm_dump
Last active October 11, 2015 18:48
Ruby RVM Info Dump: ( set -x ; cd dir ) Output
View rvm_dump
+ 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 / repo_forall_path_example
Last active May 28, 2019 16:25
List remote project and local paths using Android repo script.
View repo_forall_path_example
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 -O $HOME/.dircolors
echo 'eval $(dircolors -b $HOME/.dircolors)' >> $HOME/.bashrc
. $HOME/.bashrc
#To set if it was setup correctly
dircolors -p
chris-piekarski / dropbox monitor
Created February 3, 2013 05:31
Fix dropbox Ubuntu monitor error.
View dropbox monitor
echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches
chris-piekarski / create_gerrit_branch
Last active December 12, 2015 08:08
Create Gerrit branch from AOSP mirror
View create_gerrit_branch
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 / android_apk_location
Last active December 13, 2015 16:48
Get Android package (app) apk location
View android_apk_location
$ adb shell pm list packages -f | grep com.occipital.panorama
$ adb pull /data/app-private/com.occipital.panorama-2.apk ~/tmp
chris-piekarski / ruby_twitter_crunch
Last active December 14, 2015 01:59
Ruby Twitter Crunch It Steps
View ruby_twitter_crunch
> redis-server
> vi ./examples/Rakefile
@app_token = ''
@app_secret = ''
@user_accounts = {:name_one => { :token => '',
:secret => '',
:filter => ['cubs', '#baseball']},
chris-piekarski / compile_off_proc_cpuinfo
Created February 26, 2013 00:00
Record build time and multiprocess build for machine type
View compile_off_proc_cpuinfo
# 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 / git log alias
Last active December 14, 2015 21:49
Git log alias & GitStats HTML Output
View git log alias
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 / add_new_android_permission
Created March 19, 2013 19:53
Add new permissions to Android platform.
View add_new_android_permission
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:description="@string/permdesc_writeCompanySettings" />
<!-- Allows an application to read the company system settings. -->