Skip to content

Instantly share code, notes, and snippets.

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

Henry Addo eyedol

💾
WWWorking...
View GitHub Profile
#!/bin/bash
# To check tags, run this in the browser
# https://api.github.com/repos/ushahidi/Ushahidi_Web/tags
CURRENT_TAG='2.2b1'
PREVIOUS_TAG='2.1-stable'
# You can get this from the sql/ushahidi.sql script
CURRENT_VERSION='2.2'
//switch this code
return ($this->response_type == 'json')
? $this->array_as_json($response)
: $this->array_as_xml($response, array());
//to
return ($this->response_type == 'xml')
? $this->array_as_xml($response, array());
: $this->array_as_json($response);
$filter_crlf = array("\n", "\r");
$message = date("Y-m-d H:i:s")." : ".$message;
$mesg = str_replace($filter_crlf,'',$message);
$mesg .= "\n";
$logfile = DOCROOT."application/logs/upgrade_".$this->session->get('upgrade_session').".txt";
$logfile = fopen($logfile, 'a+');
fwrite($logfile, $mesg);
fclose($logfile);
if [[ $# -lt 2 ]]
then
echo "Usage: gen_updates.sh [previous-tag] [current-tag]"
exit 1
fi
CURRENT_TAG=$2
PREVIOUS_TAG=$1
TMPDIR="/tmp/upgrade_ushahidi"
$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"
},
{