Skip to content

Instantly share code, notes, and snippets.

tmzt

Block or report user

Report or block tmzt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mod12.c
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kobject.h>
#include <linux/platform_device.h>
#include "../fs/sysfs/sysfs.h"
struct kobject *pbus_kobject;
struct sysfs_dirent *sd;
struct sysfs_dirent *dir;
View android.c
/*
* Copyright © 2004 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
View screen.c
#include <X11/X.h>
#include <X11/Xproto.h>
#include "os.h"
#include "servermd.h"
#include "inputstr.h"
#include "scrnintstr.h"
#include "mibstore.h" // mi backing store implementation
#include "mipointer.h" // mi software cursor
#include "micmap.h" // mi colormap code
View callback.c
#include <jni.h>
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
#include "private.h"
#include <inputstr.h>
#include <mi.h>
View AndroiXService.java
package net.homeip.ofn.androix;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.view.View;
import android.content.BroadcastReceiver;
import android.content.Context;
View native.c
/*
Copyright 2010 Timothy Meade
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
View AppsView.java
package net.homeip.ofn.nativemarket;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
View androix.c
#include "../android.h"
#include <stdio.h>
#include <sys/socket.h>
#include <sys/stat.h>
static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t events_lock = PTHREAD_MUTEX_INITIALIZER;
jint
View gist:702937
$catId = $catIds[$catno];
$cat = Mage::getModel('catalog/category')->load($catId);
//$coll = Mage::getResourceModel('reports/product_collection')
$coll = Mage::getModel('catalog/product')->getCollection();
//$coll->addAttributeToFilter('category_ids',array('finset'=>explode(',',array($catId)));
// $coll->addFieldToFilter('category_ids',array('finset'=>explode(',',array($catId)) ));
// $coll->addFieldToFilter('category_ids',array('finset'=>explode(',',array($catId))));
// $coll->addFieldToFilter('featured',array(
@tmzt
tmzt / gist:828945
Created Feb 16, 2011
snippet of app.js
View gist:828945
app.post('/apis/v0/checkemail.json', function(req, res) {
var email = req.body.email;
checkemail(email, function(result) {
console.log('result: ', result);
if (result != null && result.shorturl != '') {
console.log('shorturl: ', result.shorturl);
//res.writeHead(200, {'Content-Type': 'application/json'});
//res.end(JSON.stringify(result));
console.log('json: ', JSON.stringify({html: result.html}));
You can’t perform that action at this time.