Skip to content

Instantly share code, notes, and snippets.

View JimBlaney's full-sized avatar

Jim Blaney JimBlaney

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>BorderContainer Demo</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojo/resources/dojo.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9compact/js/esri/css/esri.css">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Quick Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css" />
<style>
html, body, #map-container {
margin: 0; padding: 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>editing-test-app</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
@JimBlaney
JimBlaney / TemplatedWidgets.md
Last active August 29, 2015 14:02
A basic. rundown on creating templated widgets with the Dojo Toolkit

Creating Template-based Widgets with the Dojo Toolkit

Bare-bones Widget Definition

This is probably the most basic implementation of a templated widget that you will ever see (and never use).

define([
  "dojo/_base/declare",
 "dijit/_WidgetBase",
#!/bin/bash
#
# Converted to bash script from http://www.rubblewebs.co.uk/imagemagick/display_example.php?example=54
# Jim Blaney
#
num_x=4
num_y=3
prefix=`echo ${1} | cut -d. -f1`
@JimBlaney
JimBlaney / StyledWMSLayer.js
Created October 27, 2014 19:06
Esri JSAPI layer to support STYLES argument on WMSLayer
define([
"dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/lang",
"esri/layers/WMSLayer"
], function(
array,
declare,
lang,
WMSLayer
@JimBlaney
JimBlaney / certificate-manipulation.md
Last active September 23, 2016 10:48
OpenSSL commands for various certificate manipulations
Split PKCS12 public/private keypair into Base64-encoded PEM files (separate)
openssl pkcs12 -in certificate.p12 -out servername.crt -clcerts -nokeys
openssl pkcs12 -in certificate.p12 -out servername.key -nocerts -nodes
openssl rsa -in servername.key -out servername.key
Compute the hash of a certificate (HTTPd requires CA certs in folders to be named by hash)
openssl x509 -noout -hash -in ca-certificate-file
Compute the digest for a server certificate for inclusion in the HTTP Public-Key-Pins header

openssl s_client -connect www.example.com:443 | \

var iframe = document.createElement("IFRAME");
iframe.style.display = "none";
var onLoad = function() {
try {
var doc = iframe.contentDocument;
var form = doc.createElement("FORM");
form.setAttribute("method", "POST");
form.setAttribute("action", "YOUR_URL_HERE");
var dojoConfig = {
packages: [
{ name: 'd3', location: '../../../d3', main: 'd3' }
{ name: 'c3', location: '../../../c3', main: 'c3' }
]
};
@JimBlaney
JimBlaney / Print.js
Last active October 13, 2015 17:41
ArcGIS API for JavaScript snippet to print current map in new window
var parentMap = this.map;
require([
'dojo/_base/window',
'dojo/on',
'dojo/dom-construct',
'esri/map',
'esri/layers/ArcGISDynamicMapServiceLayer',
'esri/layers/ArcGISTiledMapServiceLayer',
'esri/layers/GraphicsLayer'