Skip to content

Instantly share code, notes, and snippets.

@fillerwriter
fillerwriter / river
Last active August 29, 2015 14:14
River config
{
"countries": [
"Syria",
"Iraq"
],
"content": [
{
"type": "reports",
"title": "REPORTS",
"icon": "un-icon-product_type_report",
@fillerwriter
fillerwriter / gist:b1bfe01310cccf448aea
Last active August 29, 2015 14:14
Financial Config
{
"dataSources": [
{
"dataItemTitle": "Iraq",
"clusters": [{
"name": "CCCM",
"name_long": "Camp Coordination and Camp Management",
"current_requirement": 32488735.0,
"original_requirement": 0.0,
"funding": 0.0,
{
"countries": ["Iraq", "Syria"],
"startDate": "2014-12-22",
"limit": "100"
}
@fillerwriter
fillerwriter / gist:91db8ab49a6df8e1d328
Last active August 29, 2015 14:14
crisis overview config
{
"title": "Crisis Overview",
"dataSource": "Data Source <cite><a href=\"http://www.unhcr.org/cgi-bin/texis/vtx/home\" target=\"_top\">UNHCR</a></cite>",
"map": {
"src": "http://crisis.unrw.p2devcloud.com/img/overview-map.jpg",
"alt": "Syria/Iraq"
},
"content": {
"syria": {
"title": "Syria",
{
"title": "Crisis Overview",
"dataSource": "Data Source <cite><a href=\"\">UNHCR</a></cite>",
"map": {
"src": "img/overview-map.jpg",
"alt": "Syria/Iraq"
},
"content": {
"syria": {
@fillerwriter
fillerwriter / gist:6156891
Created August 5, 2013 15:36
CartoCSS for NYC Apartments demo
#nycappartments {
marker-width:3;
marker-fill:#ea8f40;
marker-line-color:darken(#ea8f40, 10);
marker-allow-overlap:true;
[zoom > 13] {
marker-width: 6;
}
[zoom > 14] {
marker-width: 9;
(function($) {
$(document).ready(function() {
$('select[name="County"]').hide();
$('select[name="Districts"]').hide();
$('select[name="State"]').change(function() {
if ($('select[name="State"]').val() !== '') {
$('select[name="County"]').show();
} else {
$('select[name="County"]').hide();
}
@fillerwriter
fillerwriter / gist:5721631
Created June 6, 2013 13:49
Show/Hide county for Dave
(function($) {
$(document).ready(function() {
$('select[name="County"]').hide();
$('select[name="State"]').change(function() {
if ($('select[name="State"]').val() !== '') {
$('select[name="County"]').show();
} else {
$('select[name="County"]').hide();
}
});
function crcna_geocode_church_excecute($result){
$count = 0;
foreach ($result as $data) {
$node = (object) NULL;
$node = node_load($data->nid);
//format the address
$final_address = theme('addressfield_formatter__linear', array('address' => $node->field_church_address[$node->language][0]));
//geocode it
if($final_address) {
$geocoded_location = geocoder('google', $final_address);
@fillerwriter
fillerwriter / gist:3899520
Created October 16, 2012 14:16
Super-simple script to populate geofield data from addresses
$addresses = array('1600 Pennsylvania Ave., Washington, DC'); //
foreach ($addresses as $key => $address) {
$geocoded_location = geocoder('google', $address); // Returns a geoPHP geometry object, likely a point.
$node->field_geofield[LANGUAGE_NONE][$key] = geofield_compute_values($geocoded_location->out('wkt'));
}
//Node save as usual