Skip to content

Instantly share code, notes, and snippets.

View dkobia's full-sized avatar

David Kobia dkobia

View GitHub Profile
db.tags
{
"name": "lorem",
"type": "general"
}
db.content
{
"state": "new",
"text": [
{
"languageCode": "en",
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"text": [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eu dolor nisl, sit amet molestie dolor. Nulla pellentesque enim vel sapien pretium aliquet. Maecenas hendrerit ullamcorper consequat. Nullam sit amet felis sed erat fermentum lacinia. Nulla facilisi. Sed est est, tristique sit amet cursus ac, tincidunt a nisl. Aenean blandit tincidunt augue ut faucibus. Vestibulum molestie, arcu eget facilisis auctor, enim ligula vulputate nisi, eleifend hendrerit sapien enim sed nibh."
]
db.channels
{
"name": "Ushahidi",
"type": "Twitter",
"subType": "Follow User",
"parameters": {
"TwitterAccount": "ushahidi",
"trusted": "false"
},
"updatePeriod": 1,
db.channels
{
"name": "Ushahidi",
"type": "Twitter",
"subType": "Follow User",
"parameters": {
"TwitterAccount": "ushahidi",
"trusted": "false"
},
"updatePeriod": 1,
@dkobia
dkobia / gist:1095685
Created July 20, 2011 19:14
Swift Data
{
"id": "a8a9b40f61f61eda91a1ca558f0e13e5",
"state": "new_content",
"text": [
{
"languageCode": "en",
"title": "2nd UK Tabloid Probed by Police - TIME",
"text": [
null
]
<?php defined('SYSPATH') or die('No direct script access.');
class hello_world {
public function __construct()
{
$block = array(
"classname" => "hello_world",
"name" => "Hello World",
"description" => "Ushahidi extensible content blocks"
CREATE TABLE IF NOT EXISTS `frontlinesms`
(
id int(11) unsigned NOT NULL AUTO_INCREMENT,
frontlinesms_key varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
);
<?php
// Pagination
$pagination = new Pagination(array(
'query_string' => 'page',
'items_per_page' => (int) Kohana::config('settings.items_per_page'),
'total_items' => ORM::factory("incident")
->where("incident_active", 1)
->where($location_id_in)
->where($incident_id_in)
{
"payload": {
"task": "send",
"messages": [
{
"to": "14046474562",
"message": "Thank you for sending a message to Ushahidi. What is the closest town or city for your last message?"
}
]
}
var ci_styles = new OpenLayers.StyleMap({
"default": new OpenLayers.Style({
pointRadius: "10", // sized according to type attribute
fillColor: "${fcolor}",
strokeColor: "${scolor}",
strokeWidth: 2,
graphicZIndex: 1
},
{
context: