Skip to content

Instantly share code, notes, and snippets.

View landsurveyorsunited's full-sized avatar

Justin Farrow landsurveyorsunited

View GitHub Profile
@landsurveyorsunited
landsurveyorsunited / realtime.md
Created January 8, 2016 22:45 — forked from auremoser/realtime.md
Realtimeliness: 140 Journos + CartoDB
@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()); //
@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 / 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){
Ning inurl:profiles/blog/list -inurl:ning.com
@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(
@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`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@landsurveyorsunited
landsurveyorsunited / loremipsumizer.js
Created October 12, 2015 01:09 — forked from choonkeat/loremipsumizer.js
Bookmarklet to turn any webpage back into a wireframe with "lorem ipsum" text. elements ".brand,.nav,.page-title,.btn,.pagination,.breadcrumb,form label,h1,th" are left intact by default (if you have jQuery on the page) because sometimes we want the basic navigations and buttons), but applying the script again will proceed to anonymize them rega…
/*
Turn any webpage back into a wireframe with "lorem ipsum" text.
1. Bookmark this page
2. Edit the bookmark, and change the link into
javascript:(function(u){ c=document;b=c.body;s=c.createElement('script');s.src=u+'?r='+(new Date()).getTime();b.appendChild(s);})('https://raw.github.com/gist/585708/ac1961130915ed2aef0e67bc97d35ead08513aba/loremipsumizer.js');void(0);
3. Visit any webpage
4. Click on the bookmark
@landsurveyorsunited
landsurveyorsunited / uservoice-gadget.xml
Last active September 19, 2015 01:51 — forked from populov/uservoice-gadget.xml
Gadget for integrating Uservoice into your site, based on Google Sites.
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<!-- See http://uservoice.com for Uservoice service description -->
<ModulePrefs
title="Uservoice for Google Sites"
title_url="https://code.google.com/p/google-sites-uservoice/"
description="Add support and feedback features provided by Uservoice service to your Google Site"
directory_title="Uservoice for Google Sites"
thumbnail="https://google-sites-uservoice.googlecode.com/git/gsuv-logo.png"
screenshot="https://google-sites-uservoice.googlecode.com/git/screen.png"