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"
package api | |
import ( | |
"appengine" | |
"github.com/Moddus/go-restful" | |
) | |
type Basic struct { | |
Version string | |
Message string |
/** | |
* error type | |
*/ | |
typedef int state_t; | |
/** | |
* error states | |
*/ | |
#define STATE_SUCCESS (0) | |
#define STATE_NULL_PTR (1) |
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"
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"
fd = socket(AF_INET, SOCK_DGRAM, 0); | |
server_addr.sin_family = AF_INET; | |
#ifdef HAVE_SIN_LEN | |
server_addr.sin_len = sizeof(struct sockaddr_in); | |
#endif | |
server_addr.sin_addr.s_addr = "127.0.0.1"; | |
server_addr.sin_port = htonl(7); | |
memset((void *) buf, ’A’, sizeof(buf)); |
# commands | |
alias lsa='ls -lah' | |
alias l='ls -lah' | |
alias ll='ls -lh' | |
alias la='ls -lAh' | |
alias sl=ls # often screw this up | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias less='less -N' |
/* | |
* Search a particular hash table for a conversation with the specified | |
* {addr1, port1, addr2, port2} and set up before frame_num. | |
*/ | |
static conversation_t * | |
conversation_lookup_hashtable(GHashTable *hashtable, const guint32 frame_num, const address *addr1, const address *addr2, | |
const port_type ptype, const guint32 port1, const guint32 port2) | |
{ | |
conversation_t* convo=NULL; | |
conversation_t* match=NULL; |
#!/bin/bash | |
COMPILE="" | |
ssh bsd9 "mkdir -p $1 && rm -rf $1/*" | |
for filename in *; do | |
if [[ -f $filename ]]; then | |
EXT=${filename##*.} | |
if [ "$EXT" == c ] || [ "$EXT" == h ]; then |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)