Skip to content

Instantly share code, notes, and snippets.

View m00sey's full-sized avatar
🏠
Working from home

Kevin Griffin m00sey

🏠
Working from home
  • GLEIF
  • Philadelphia
View GitHub Profile
;Exercise 1.5.
;Ben Bitdiddle has invented a test to determine whether the interpreter he is faced with is using
; applicative-order evaluation or normal-order evaluation. He defines the following two procedures:
;(define (p) (p))
;
;(define (test x y)
; (if (= x 0)
; 0
; y))
;
@m00sey
m00sey / ToastPlugin.java
Created June 17, 2011 16:27
Code Snippets for PhoneGap Plugin Post
package com.yourpackage;
import org.json.JSONArray;
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;
public class ToastPlugin extends Plugin {
-Dee.executable=${ee.home}/simulator/fledge
-Dee.bootclasspath=${ee.home}/lib/net_rim_api.jar
-Dee.javadoc=file:${ee.home}/docs/api
@m00sey
m00sey / gist:1059312
Created July 1, 2011 20:18
Loading Plugins from AndroidManifest

Loading plugins from the AndroidManifest.xml As an alternative to registering plugins through JavaScript plugins can now be loaded via the AndroidManifest, using the meta-data element.

A demo can be found at https://github.com/m00sey/Toasty (you'll need to update the jar to 9.6.1)

Registering a plugin

Plugin names are prefixed with plugin. this is so the keys can be identified when loading the meta data. The value is the fully qualified name.
public class ToastPlugin extends Plugin {
private static final String TAG = "ToastPlugin";
private static final String LONG_TOAST_ACTION = "show_long";
private static final int TOAST_MESSAGE_INDEX = 0;
@Override
public PluginResult execute(String action, JSONArray data, String callbackId) {
String toastMessage;
try {
@m00sey
m00sey / index.html
Created July 8, 2011 00:20
Updates registering plugins
navigator.tp.showLong('bar');
<?xml version="1.0" encoding="utf-8"?>
<plugins>
<plugin name="App" value="com.phonegap.App" />
<plugin name="Geolocation" value="com.phonegap.GeoBroker" />
<plugin name="Device" value="com.phonegap.Device" />
<plugin name="Accelerometer" value="com.phonegap.AccelListener" />
<plugin name="Compass" value="com.phonegap.CompassListener" />
<plugin name="Media" value="com.phonegap.AudioHandler" />
<plugin name="Camera" value="com.phonegap.CameraLauncher" />
<plugin name="Contacts" value="com.phonegap.ContactManager" />
@m00sey
m00sey / AndroidManifest.xml
Created September 10, 2011 01:01
Building an NFC enabled Android application with PhoneGap
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:mimeType="my/mimetype" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@m00sey
m00sey / gist:ddb5f9ef7622c83e9c4afbf4b3cb44ce
Last active November 16, 2016 20:38
Dagger/Firebase compilation exception
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.IllegalArgumentException
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)

1. Open your mac...

2. Install some software

  • Chrome / Chromium
  • Git
  • Slack
  • Brew

3. Install Scoir back-end dependencies