Skip to content

Instantly share code, notes, and snippets.

@ns-1m
ns-1m / geojson.js
Created July 8, 2012 02:40 — forked from mourner/geojson.js
Leaflet GeoJSON API proposal
var geojson = L.geoJson(data, {
// style for all vector layers (color, opacity, etc.) (optional)
getStyle: function (feature) {
return feature.properties && feature.properties.style;
},
// function for creating layers for GeoJSON point features (optional)
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {
@ns-1m
ns-1m / README.txt
Created June 29, 2012 04:47 — forked from davidfischer/README.txt
How Social is Your Code?
When one says "social coding" I ask "how social"? One measure of social-ness is the number of distinct collaborators.
The data is from the github.timeline dataset. The visualization uses D3 and is adapted from the Sunburst example.
Click http://bl.ocks.org/2866246 to view it in all its glory.
@ns-1m
ns-1m / dsShows.cshtml
Created June 25, 2012 10:48 — forked from theClarkSell/dsShows.cshtml
Consuming an OData Service from jQuery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="author" content="Clark Sell" />
<title>Consuming an OData Service from jQuery</title>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.6.2.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> <!-- http://api.jquery.com/category/plugins/templates/ -->
@ns-1m
ns-1m / ODataTable.html
Created June 25, 2012 05:59 — forked from qmacro/ODataTable.html
SAPUI5 says "Hello OData" to NetWeaver Gateway
// I am trying to modify this gist inorder to run into iPhone/iPad using jquery with User login (User, Password and source)
// Details using SAP gateway demo. I think we can modify this source
// http://gateway.server:port/sap/opu/sdata/IWFND/RMTSAMPLEFLIGHT/?$format=xml
// This is the SAP demo gateway portal
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/1051f6d9-e87a-2e10-d188-e2786c7878b1
User: GW@ESW
Password: "ESW4GW"
@ns-1m
ns-1m / leaflet-button-control.js
Created June 15, 2012 09:07 — forked from ejh/leaflet-button-control.js
Leaflet control button example
// How to use it?
// OnAdd() is called when you use:
// var footButton = new L.Control.Button(footButtonOpts).addTo(map);
// It is passed the map object to which your control is being added.
// The third parameter passed to L.DomEvent.addListener is the context ('this' keyword) which
// you wish to have in the callback (second parameter).
// I still don't know how to use it.
@ns-1m
ns-1m / scroller_example
Created June 9, 2012 06:57
Scoller example
#outer
{
Position: relative;
Top: 10px;
Left: 10px;
Width: 300px;
Height: 380px;
Overflow:hidden;
Border: 3px solid #000;
Background-Color: #145;
@ns-1m
ns-1m / index.html
Created June 9, 2012 02:43 — forked from elsewhat/index.html
PhoneGap and SAPUI5 index file
<html>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="phonegap/cordova-1.6.0.js"></script>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="sapui5/resources/sap-ui-core.js"
data-sap-ui-theme="sap_platinum"
@ns-1m
ns-1m / scroller.js
Created June 8, 2012 23:29 — forked from kerrishotts/scroller.js
This library is intended to be similar to iScroll-lite in that it should be a relatively fast method of scrolling content without being horribly laggy or cause incorrect "clicks" to be registered.
/******************************************************************************
*
* SCROLLER
* Author: Kerri Shotts
* Version: 0.1 alpha
* License: MIT
*
* This library is intended to be similar to iScroll-lite in that it should be
* a relatively fast method of scrolling content without being horribly laggy
* or cause incorrect "clicks" to be registered.
@ns-1m
ns-1m / shell.html
Created May 31, 2012 10:51 — forked from elsewhat/shell.html
sapui5 beta - Shell component running on phonegap
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>sap.ui.ux3.Shell Test</title>
<script src="sapui5/resources/sap-ui-core.js"
type="text/javascript"
id="sap-ui-bootstrap"
@ns-1m
ns-1m / app.js
Created May 28, 2012 10:15 — forked from tristen/app.js
Toggle on and off a layer
var baseMap = 'mapbox.world-bright'
var layers = [
baseMap
];
var loadMap = function(layers) {
var url = 'http://api.tiles.mapbox.com/v3/' + layers + '.jsonp';
wax.tilejson(url, function(tilejson) {
var map = new MM.Map('map', new wax.mm.connector(tilejson));
map.setCenterZoom({ lat: 39, lon: -98 }, 4);