Skip to content

Instantly share code, notes, and snippets.

$.getJSON("https://spreadsheets.google.com/feeds/list/insert-spreadsheet-key/od6/public/values?alt=json", function(data) {
for (var i = 0; i < data.feed.entry.length; i++){
//first row "bookname" & "price" columns
$('#results').append(data.feed.entry[i].gsx$bookname.$t + " Price: " + data.feed.entry[i].gsx$price.$t + "<br/>");
}
});
<!DOCTYPE html>
<html>
<head>
<title>My Books</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
<script>
//Telling Angular to use our module with ng-app
//Second parameter of module is a blank array
var myApp = angular.module("myApp", []);
@mvark
mvark / foodtracker.html
Last active April 3, 2017 20:29
Single Page Application (SPA) to track food expiry dates shows how to implement CRUD functionality through Azure Mobile Services HTTP OData REST calls, without writing any server-side code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Food Tracker</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link href='http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.1.1/fullcalendar.min.css' rel='stylesheet' />
@mvark
mvark / AphoneticWords.html
Created December 31, 2014 08:01
Track & learn about Aphonetic Words. Demo - http://mvark.blogspot.in/p/aphonetic-words.html?m=1
<!DOCTYPE html>
<html>
<head>
<title>Aphonetic Words</title>
</head>
<body>
<style>
body { margin: 2px; font-size: 40px; }
.cell { margin: 5px; }
audio { width:45px; height:25px;}
@mvark
mvark / OAuthASPNETWebForms.cs
Created January 2, 2015 17:53
Authentication & Authorization using OAuth 2.0 Providers with ASP.NET WebForms: Code from Blaize Stewart's video tutorial "OAuth 2.0 Up and Running" (requires subscription), modified to include Microsoft's Live Connect functionality. See related blog posting - http://mvark.blogspot.in/2014/01/how-to-implement-authentication.html
/*
OAuthRedirectPage.aspx
==========================
<div>
<asp:Label ID="OAuthLabel" runat="server" Text="Label"></asp:Label>
</div>
OAuthRedirectPage.aspx.cs
==========================
*/
@mvark
mvark / WeatherTrackerGenericHandler.cs
Last active August 29, 2015 14:12
Generic Handler (.ASHX) which draws info from Yahoo Weather API & stores in Windows Azure Table. More info - http://mvark.blogspot.in/2014/01/how-to-make-automated-call-to-web-page.html
/*
This Generic Handler (.ASHX) code sample shows how to draw info from Yahoo Weather API & store it in Windows Azure Table.
The code can be configured to be triggered by an automated call to the Generic Handler (.ASHX) through Windows Azure Scheduler
*/
<%@ WebHandler Language="C#" Class="temp" %>
using System;
using System.Web;
@mvark
mvark / MobilizerBookmarklet.js
Created January 8, 2015 04:54
This bookmarklet redirects the URL of the currently open web page to the Google Mobilizer web service which processes it to show just the text and optionally images within web pages. More info - http://mvark.blogspot.in/2012/04/google-mobilizer-bookmarklet-view-just.html
javascript:(function() {
location.href = 'http://www.google.com/gwt/x?noimg=1&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8&u=' + encodeURIComponent(location.href);
}
())
@mvark
mvark / DownloadAsWordWithFooter.vb
Created January 8, 2015 10:23
Add a header or footer to a dynamically generated Word document using HTML & CSS (observe line#s 32-37, 49, 73-76) - http://mvark.blogspot.in/2007/02/how-to-add-header-or-footer-to.html
<%@ Page Language="VB" %>
<script runat="server">
Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
'build the content for the dynamic Word document
'in HTML alongwith some Office specific style properties.
Dim strBody As New System.Text.StringBuilder("")
strBody.Append("<html " & _
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E)
{
try
{
System.Data.DataTable workTable = new System.Data.DataTable();
workTable.TableName = "Customers";
workTable.Columns.Add("Id");
workTable.Columns.Add("Name");
@mvark
mvark / Freetextbox.cs
Created January 8, 2015 10:49
Generate a Word document dynamically with user submitted text formatted with Free Text Box - This code sample show how to generate a Word document dynamically with user submitted text formatted with a rich text editor control like Free Text Box. By cross posting the formatted text (captured through FreeTextBoxdemo.aspx) to a separate Word file g…
<%@ Page Language="C#" ValidateRequest="false"%>
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Generate a Word document dynamically with user submitted text formatted with