Skip to content

Instantly share code, notes, and snippets.

View landsurveyorsunited's full-sized avatar

Justin Farrow landsurveyorsunited

View GitHub Profile
@landsurveyorsunited
landsurveyorsunited / ning-json-fix.sh
Created October 12, 2015 22:13 — forked from rahul286/ning-json-fix.sh
Fixing invalid json files created by Ning Archiver tool
## MAC OSX users, please note that following codes won't work with BSD based sed implementation.
## You can get GNU Mac- `brew install gnu-sed --default-names`
sed -i -e '1s/^.//' ning*
sed -i -e '$s/.$//' ning*
sed -i -e 's/}{/},{/g' ning*
sed -i -e 's/}]{/},{/g' ning*
## extra: to verify if files are valid JSON filesmm run jsonlint
## To install `npm install jsonlint -g`
@landsurveyorsunited
landsurveyorsunited / gist:d9d5bcec1a99306e544c
Created October 12, 2015 22:14 — forked from drogers98/gist:f3a35a4ac658608c4403
D7 Feeds JSON JSONPath parser ning users importer example
$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'ning_users';
$feeds_importer->config = array(
'name' => 'Ning Users',
'description' => 'port over ning users',
'fetcher' => array(
'plugin_key' => 'FeedsFileFetcher',
'config' => array(
Ning inurl:profiles/blog/list -inurl:ning.com
@landsurveyorsunited
landsurveyorsunited / code.gs
Created October 16, 2015 23:26 — forked from mhawksey/code.gs
Google Apps Script snippet which uses viewer settings on Google Sheet to control who views
var DOC_ID = '1K5IJLwK7qBUfLAG-tic9hOK3L8x4qUIQgd3gryHNE6Y';
function doGet() {
var doc =SpreadsheetApp.openById(DOC_ID);
var auth_user = doc.getViewers();
var auth = auth_user.map(function(user) {
return String(user);
});
var user = Session.getActiveUser().getEmail();
if (auth.indexOf(user) > -1){
@landsurveyorsunited
landsurveyorsunited / gist.css
Created October 17, 2015 00:08 — forked from bborysenko/gist.css
Google Site Gist
body, td, div, span, p {
font: 12px Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace !important;
}
.gist-highlight {
padding: 1em 0 !important;
}
.gist-syntax { background: #ffffff; !important }
@landsurveyorsunited
landsurveyorsunited / pullJSON.js
Created November 5, 2015 22:33 — forked from varun-raj/pullJSON.js
Google App Script To Fetch Data From JSON Webservice and Write them to google spreadsheet.
function pullJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet = ss.getActiveSheet();
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var dataAll = JSON.parse(response.getContentText()); //
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}
/*
CryptoJS v3.0.2
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js
*/
var CryptoJS=CryptoJS||function(i,p){var f={},q=f.lib={},j=q.Base=function(){function a(){}return{extend:function(h){a.prototype=this;var d=new a;h&&d.mixIn(h);d.$super=this;return d},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var d in a)a.hasOwnProperty(d)&&(this[d]=a[d]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.$super.extend(this)}}}(),k=q.WordArray=j.extend({init:function(a,h){a=
this.words=a||[];this.sigBytes=h!=p?h:4*a.length},toString:function(a){return(a||m).stringify(this)},concat:function(a){var h=this.words,d=a.words,c=this.sigBytes,a=a.sigBytes;this.clamp();if(c%4)for(var b=0;b<a;b++)h[c+b>>>2]|=(d[b>>>2]>>>24-8*(b%4)&255)<<24-8*((c+b)%4);else if(65535<d.length)for(b=0;b<a;b+
@landsurveyorsunited
landsurveyorsunited / realtime.md
Created January 8, 2016 22:45 — forked from auremoser/realtime.md
Realtimeliness: 140 Journos + CartoDB
@landsurveyorsunited
landsurveyorsunited / README.md
Created January 8, 2016 22:47 — forked from andrewxhill/README.md
How to fully customize infowindows in CartoDB

Advanced Infowindow Design

Getting Started

In this section, we will show you the advanced methods for controlling infowindows styles using the CartoDB interface. These skills will allow you to have highly customized infowindows for your published maps, created directly on your account. You don't need any programming skills to edit infowindows and you can see a tutorial of basic methods here. This section is about advanced methods and you will be required to use basic skills in HTML and later CSS.

Editing Infowindow HTML

CartoDB gives you direct access to the HTML that controls the layout of your infowindows. If you don't feel ready to edit HTML and CSS see the tutorial of basic methods. In CartoDB you can find the advanced editor by selecting the Infowindow Wizard and then clicking the small code tag in the upper right.