Skip to content

Instantly share code, notes, and snippets.

4.-292.14360.-220.107.150
a/g:.364.-224.14300.-216.109.177
a/g:.336.-272.14464.-187.99.168
a/g:.276.-276.14304.-225.84.170
a/g:.288.-276.14372.-208.85.172
a/g:.284.-236.14344.-218.81.156
a/g:.376.-212.14504.-188.105.194
a/g:.396.-148.14484.-180.109.189
a/g:.344.-104.14508.-237.117.192
a/g:.364.-44.14384.-217.119.160
@harryhow
harryhow / gist:9456596
Created March 9, 2014 23:29
build.mk for MPU6050 customized lib for Spark Core
# This file is a makefile included from the top level makefile which
# defines the sources built for the target.
# Define the prefix to this directory.
# Note: The name must be unique within this build and should be
# based on the root of the project
TARGET_SD_PATH = lib/myproject
TARGET_SD_SRC_PATH = $(TARGET_SD_PATH)/src
# Add include to all objects built for this target
package com.space150.android.glass.opencvfacedetection;
import org.opencv.android.JavaCameraView;
import android.content.Context;
import android.hardware.Camera;
import android.util.AttributeSet;
import android.util.Log;
public class JView extends JavaCameraView {
@harryhow
harryhow / gist:c8f7bc3d48842b5fe362
Last active August 29, 2015 14:00
surfaceChanged for glass face detection example
package com.space150.android.glass.opencvfacedetection;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.opencv.android.BaseLoaderCallback;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
import org.opencv.android.JavaCameraView;
@harryhow
harryhow / gist:70dd41bf059248eb060d
Created April 30, 2014 23:51
run open camera log
04-30 19:50:56.511: I/OCVSample::Activity(1960): Instantiated new class com.space150.android.glass.opencvfacedetection.MainActivity
04-30 19:50:56.519: I/OCVSample::Activity(1960): called onCreate
04-30 19:50:56.534: D/CameraBridge(1960): Attr count: 3
04-30 19:50:56.550: W/ContextImpl(1960): Implicit intents with startService are not safe: Intent { act=org.opencv.engine.BIND } android.content.ContextWrapper.bindService:517 org.opencv.android.AsyncServiceHelper.initOpenCV:24 org.opencv.android.OpenCVLoader.initAsync:60
04-30 19:50:56.964: D/OpenGLRenderer(1960): Enabling debug mode 0
04-30 19:50:57.011: I/OCVSample::Activity(1960): +++++++++++++++ surfaceCreated called +++++++++++++++
04-30 19:50:57.019: I/OCVSample::Activity(1960): surfaceCreated called: %d1
04-30 19:50:57.183: D/CameraBridge(1960): call surfaceChanged event
04-30 19:50:57.191: I/OCVSample::Activity(1960): +++++++++++++++ surfaceChanged called +++++++++++++++
04-30 19:50:57.230: I/OCVSample::Activity(1960): surfaceChanged, done setup------

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
@harryhow
harryhow / .gitignore
Last active August 29, 2015 14:12 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
void HandleOnSwipeEvent (GameObject pickupTarget,Vector2 direction)
{
if(isCaught==true)return;
if(pickupTarget!=null&&pickupTarget.tag=="Ball"){
float force=direction.SqrMagnitude();
force=force/100;
Debug.Log ("force="+force);
direction.Normalize();
// Debug.Log ("Ball Direction="+(_rigidbody2D.velocity+new Vector2(0,30)));
@harryhow
harryhow / Macros.h
Last active August 29, 2015 14:25 — forked from numo16/Macros.h
Some useful iOS/Objective-C Macros
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])
#define UserDefaults [NSUserDefaults standardUserDefaults]
#define NotificationCenter [NSNotificationCenter defaultCenter]
#define SharedApplication [UIApplication sharedApplication]
#define Bundle [NSBundle mainBundle]
#define MainScreen [UIScreen mainScreen]
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x
#define NavBar self.navigationController.navigationBar