Skip to content

Instantly share code, notes, and snippets.

View eyedol's full-sized avatar
💾
WWWorking...

Henry Addo eyedol

💾
WWWorking...
View GitHub Profile
{
"count": 3,
"results": [
{
"id": "4",
"url": "http://localhost/Lamu/httpdocs/api/v2/media/4",
"caption": "ihub",
"mime": "image/jpeg",
"original_file_url": "http://localhost/Lamu/httpdocs/Lamu/httpdocs/media/kohana/home/eyedol/Devel/Workspace/Lamu/application/uploads/h7r_1382082949_o.jpg",
"original_width": "420",
* About to connect() to localhost port 80 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 80 (#0)
> POST /Lamu/httpdocs/api/v2/media HTTP/1.1
> User-Agent: CMD User Agent
> Host: localhost
> Accept: */*
> Content-Length: 25364
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------17927af4cfcd
@eyedol
eyedol / default.php
Created October 8, 2013 22:17
media route
Route::set('media','api/v2/media/<media_id>/<controller>(/<id>)',
array(
'media_id' => '\d+',
'id' => '\d+'
))
->defaults(array(
'action' => 'index',
'controller' => 'Media',
'directory' => 'Api'
));
com.crowdmap.java.sdk.CrowdmapException: com.crowdmap.java.sdk.CrowdmapException: {"title":"Slim Application Error","code":8,"message":"Undefined variable: avatar","file":"\/root\/cm3\/api\/resources\/users.php","line":238,"trace":[{"file":"\/root\/cm3\/api\/resources\/users.php","line":238,"function":"handleErrors","class":"Slim","type":"::","args":[8,"Undefined variable: avatar","\/root\/cm3\/api\/resources\/users.php",238,{"user_id":"23","return":true,"cached":false,"user":{"user_index":"33","user_id":"ffd94997f1ecf27189271ca82951161c77c44240704433beb51660e75414f974afd1c731d40cf8f352d8b4067b0b9b0d3287645d4fbb8c2c9d1720d5969822fa","registered":"2012-10-29 10:14:44","avatar":"http:\/\/www.gravatar.com\/avatar\/1ff60c455589ab5059123f05eb309240?r=PG&s=200&d=404","badges":[]}}]},{"file":"\/root\/cm3\/api\/resources\/maps.php","line":60,"function":"avatar","class":"users","type":"::","args":["23",true]},{"file":"\/root\/cm3\/api\/resources\/users.php","line":159,"function":"getMaps","class":"Maps","type":"::","a
@eyedol
eyedol / error
Created September 4, 2013 07:31
{"title":"Slim Application Error","code":8,"message":"Trying to get property of non-object","file":"\/root\/cm3\/api\/resources\/posts.php","line":160,"trace":[{"file":"\/root\/cm3\/api\/resources\/posts.php","line":160,"function":"handleErrors","class":"Slim","type":"::","args":[8,"Trying to get property of non-object","\/root\/cm3\/api\/resources\/posts.php",160,{"post_id":false,"user_id":false,"map_id":"2006","tags":["book"],"options":[],"apiUser":{"user_id":1,"crowdmap_id":"","crowdmap_id_h":"d41d8cd98f00b204e9800998ecf8427e","username":"anonymous","name":"Anonymous","bio":"","plus":false,"baselayer":"crowdmap_satellite","instagram_auto_post":"0","twitter_auto_post":"0","twitter_auto_post_retweets":"0","date_registered":"1363602996","banned":false},"apiApplication":{},"cached":false,"allowed_post_ids":[],"limiting_by_post_ids":true,"posts":{},"posts_maps":{},"map":false}]},{"file":"\/root\/cm3\/api\/core\/router-api-1.php","line":184,"function":"getPosts","class":"Posts","type":"::","args":[false,false,"2
@eyedol
eyedol / MyReportFields
Last active December 21, 2015 17:19
How to extend Ushahidi reports field
MyReportFields extends ReportFields {
@FormField(name="extraInfo")
private String extraInfo;
public void setExtraInfo(String extraInfo) {
this.extraInfo = extraInfo;
}
public String getExtraInfo() {
if (isset($_GET['task']))
{
$m = "Your message has been received";
$f = "0267123407";
$s = "true";
$reply[0] = array("to" => $f, "message" => $m);
echo json_encode(array("payload"=>array("success"=>$s,"task"=>"send","messages"=>array_values($reply))));
}
@eyedol
eyedol / get_response
Created August 6, 2013 05:41
get response
/smssync.php?task=send&secret=123456 HTTP/1.1" 200 120 "-" "SMSSync-Android/v2.4"
@eyedol
eyedol / tast_response
Created August 6, 2013 05:28
Task response
{
"payload": {
"task": "send",
"secret": "secret_key",
"messages": [
{
"to": "+000-000-0000",
"message": "the message goes here"
},
{
@eyedol
eyedol / foremost
Created July 3, 2013 13:59
How to recover lost images on an SD card
sudo foremost -a -T jpeg -i /dev/mmcblk0 -o rec