Skip to content

Instantly share code, notes, and snippets.

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

Henry Addo eyedol

💾
WWWorking...
View GitHub Profile
$tweet = json_decode($twitter_json);
foreach( $tweet->statuses as $status )
{
print $status->user->screen_name.'<br />';
}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SwiftRiver API 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ swiftriver-api ---
@eyedol
eyedol / gist:5683262
Created May 31, 2013 06:35
exception
May 31, 2013 3:22:29 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter SolrRequestFilter
org.apache.solr.common.SolrException: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: http://wiki.apache.org/solr/SolrLogging
at org.apache.solr.servlet.SolrDispatchFilter.<init>(SolrDispatchFilter.java:105)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
Generating grub.cfg ...
Found theme: /boot/grub2/themes/system/theme.txt
Found linux image: /boot/vmlinuz-3.9.4-200.fc18.x86_64
Found initrd image: /boot/initramfs-3.9.4-200.fc18.x86_64.img
Found linux image: /boot/vmlinuz-3.6.10-4.fc18.x86_64
Found initrd image: /boot/initramfs-3.6.10-4.fc18.x86_64.img
Found linux image: /boot/vmlinuz-3.9.4-200.fc18.x86_64
Found initrd image: /boot/initramfs-3.9.4-200.fc18.x86_64.img
Found linux image: /boot/vmlinuz-3.6.10-4.fc18.x86_64
Found initrd image: /boot/initramfs-3.6.10-4.fc18.x86_64.img
@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
@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 / 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"
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 / 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() {
@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