Skip to content

Instantly share code, notes, and snippets.

View landsurveyorsunited's full-sized avatar

Justin Farrow landsurveyorsunited

View GitHub Profile
@landsurveyorsunited
landsurveyorsunited / feed-georss.php
Last active September 19, 2015 01:36 — forked from sta1r/feed-georss.php
A geoRSS-formatted feed template for Wordpress
<?php
/*
GeoRSS formatted output for Google Maps
Authors: Alastair Mucklow, Chris Toppon
*/
//header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
//$more = 1;
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'" standalone="yes"?'.'>'; ?>
@landsurveyorsunited
landsurveyorsunited / googleSitesJqueryCheck.html
Last active August 31, 2015 00:58 — forked from n8henrie/googleSitesJqueryCheck.html
Check which versions of jQuery are working on Google Sites.
<div id="jquery_check">Versions of jQuery that are working in Google Sites HTML Box as of </div>
<script>
var div = document.getElementById('jquery_check');
div.innerHTML = div.innerHTML + new Date;
</script>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script>
<script>
var div = document.getElementById('jquery_check');

Script to sync a Google SpreadSheet to a Fusion Table

I will admit that save for a few legacy projects that still use Fusion Tables I don't actively use this script anymore -- hence no real development or maintaining of it.

Something changed on the authentication end a while back it seems, and I can't vouch for whether this script continues to work or not. I know that once I enabled two-factor authentication for my Google account this script stopped working.

I've added a couple potential solutions here, but would welcome someone -- Google or otherwise -- to offer a long-term maintained solution.

Thanks goes out to John McGrath who did the bulk of the work in making this script happen.

function getImportio() {
var url = "YOUR_IMPORTHTML_URL";
/*
* Class UrlFetchApp
*
* Fetch resources and communicate with other hosts over the Internet. This service allows
* scripts to communicate with other applications or access other resources on the web by
* fetching URLs. A script can use the URL Fetch service to issue HTTP and HTTPS requests
* and receive responses. The URL Fetch service uses Google's network infrastructure for
function doGet(e){
// get some variables passed from the querystring
var project = e.parameter.title;
var range = e.parameter.range;
var sheet = e.parameter.sheet;
// Grab a basic html template to fill in the blanks - see https://developers.google.com/apps-script/html_service
var t = HtmlService.createTemplateFromFile("reportTemplate");
// some bits of code to grab the source urls
var doc = SpreadsheetApp.openById(ScriptProperties.getProperty('active'));
@landsurveyorsunited
landsurveyorsunited / css_resources.md
Created April 30, 2014 23:05 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@landsurveyorsunited
landsurveyorsunited / javascript_resources.md
Created April 30, 2014 23:05 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
/*
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+
/*
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;
}