Skip to content

Instantly share code, notes, and snippets.

@Moddus
Moddus / adb am gcm.md
Last active January 1, 2016 00:19
Some stuff i need for Android development

general:

am broadcast -a <Intent-Name> -n <Package>/<Receiver-Name-with-leading-dot> <Extras>

example:

am broadcast -a com.google.android.c2dm.intent.REGISTRATION -n de.example/.GCMBroadcastReceiver 
--es "registration_id" "1234"

tail recursive vs not tail recursive

not tail recursive

def fac( n: Int ): Int =
    if ( n == 0 ) 1
    else n * fac( n - 1 )
@Moddus
Moddus / adb am gcm.md
Last active February 15, 2022 09:23
Android GCM braodcast intent on adb shell to test REGISTRATION

general:

am broadcast -a <Intent-Name> -n <Package>/<Receiver-Name-with-leading-dot> <Extras>

example:

am broadcast -a com.google.android.c2dm.intent.REGISTRATION -n de.example/.GCMBroadcastReceiver 
--es "registration_id" "1234"
@Moddus
Moddus / example.c
Created May 17, 2013 09:12
Example error handling in c.
/**
* error type
*/
typedef int state_t;
/**
* error states
*/
#define STATE_SUCCESS (0)
#define STATE_NULL_PTR (1)
@Moddus
Moddus / root_service.go
Last active December 17, 2015 07:59
Example: Appengine and go-restful
package api
import (
"appengine"
"github.com/Moddus/go-restful"
)
type Basic struct {
Version string
Message string