Skip to content

Instantly share code, notes, and snippets.

View shurane's full-sized avatar

Ehtesh Choudhury shurane

  • Astoria, NY | Seattle, WA
  • 19:14 (UTC -07:00)
View GitHub Profile
@shurane
shurane / csvtest.py
Created July 12, 2011 19:00
Question asked earlier today -- but this should be legible and understandable. Everything is outputted to "MQ_List-output.csv"
#!/usr/bin/env python
import csv
import sys
import os.path
#filename1 = csv with all the important rows (inputfile)
#filename2 = csv that sorts filename1 by groups (sortby)
#filename3 = alternate filename, by default it is filename1 appended with '-output.csv' (output_file)
if len(sys.argv) <= 2:
@shurane
shurane / vimrc-vam.vim
Created July 23, 2011 03:06
A simple way to only load the repos I want?
" VAM for plugin management
" after setting this up
function! ActivateVAM()
let addons_base = expand('$HOME') . '/vim-addons'
let addons_manager = addons_base . '/vim-addon-manager'
execute 'set runtimepath+=' . addons_manager
if finddir(addons_base, '') == ''
call mkdir(addons_base, '')
endif
@shurane
shurane / hugs-insert.js
Created August 2, 2011 03:22
Pull hug.css into current website to use as a grid -- well if I knew where to host the .css file
var tempLink = document.createElement("link");
var hugDiv = document.createElement("div");
var columns = 5;
tempLink.href = "http://link/to/hug.css";
tempLink.type = "text/css";
hugDiv.id = "hug"
leftDiv = document.createElement("div");
@shurane
shurane / twitter.m
Created August 29, 2011 21:05
Twitter Result
// TwitterPreview
- (void) webViewDidStartLoad:(KUIWebView *) webView {
}
- (void) webViewDidFinishPageLoad(KUIWebView *) webView {
}
- (void) webViewDidFinishLoad(KUIWebView *) webView {
}
@shurane
shurane / Activity+Service.java
Created June 5, 2012 20:42
android.os.Message being delayed.
### binding part
public Something extends Activity {
public void analyticsBind(){
Log.d(TAG, "bindToAnalyticsService()");
Intent i = new Intent();
i.setClassName("com.gimme.service", "com.gimme.service.SomeService");
bindService(i, mAnalyticsConnection, Context.BIND_AUTO_CREATE);
@shurane
shurane / local_manifest.xml
Created August 10, 2012 17:56
Adding TripNRaver's sources on top of jellybean
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch="git://github.com/"/>
<!--<project name="intermediaterepresentation/android_kernel_htc_endeavor" path="kernel/htc/endeavor" remote="github" />-->
<!--<project name="intermediaterepresentation/android_device_htc_endeavor" path="device/htc/endeavoru" remote="github" />-->
<!--<project name="intermediaterepresentation/android_device_htc_endeavor" path="device/htc/endeavoru" remote="github" />-->
<project name="TripNRaVeR/tripndroid-endeavoru-2.6.39.4" path="kernel/htc/endeavor" remote="github" revision="refs/heads/master"/>
<project name="TripNRaVeR/android_device_htc_endeavoru" path="device/htc/endeavoru" remote="github" revision="refs/heads/jellybean"/>
<project name="TripNRaVeR/android_vendor_htc_endeavoru" path="vendor/htc/endeavoru" remote="github" revision="refs/heads/jellybean"/>
</manifest>
@shurane
shurane / build_output
Created August 13, 2012 19:47
Failed cm10 build for maguro
#I'm on Ubuntu 12.04
repo init -u git://github.com/CyanogenMod/android.git -b jellybean && repo sync
source build/envsetup.sh
breakfast cm_maguro-userdebug
time make CC=gcc-4.4 CXX=g++-4.4 -j1
...
Note: Recompile with -Xlint:deprecation for details.
target Symbolic: icache (out/target/product/maguro/symbols/system/bin/icache)
Import includes file: out/target/product/mako/obj/UTILITY_EXECUTABLES/static_busybox_intermediates/import_includes
make: *** No rule to make target `out/target/product/mako/obj/STATIC_LIBRARIES/libext4_utils_intermediates/export_includes', needed by `out/target/product/mako/obj/UTILITY_EXECUTABLES/utility_make_ext4fs_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
Export includes file: external/busybox/Android.mk -- out/target/product/mako/obj/UTILITY_EXECUTABLES/static_busybox_intermediates/export_includes
lsb_release -a
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 12.04.1 LTS
# Release: 12.04
# Codename: precise
uname -a
# Linux un 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
lunch
You're building on Linux
Breakfast menu... pick a combo:
1. mini_armv7a_neon-userdebug
2. mini_armv7a-userdebug
3. htc_endeavoru-userdebug
4. htc_endeavoru-eng
5. full_maguro-userdebug
6. cm_quincyatt-eng