Skip to content

Instantly share code, notes, and snippets.

@swingley
swingley / gist:4512807
Last active December 10, 2015 23:58
JavaScript example of using a function with a renderer to symbolize features in an ArcGIS API for JavaScript app.
// create a class breaks renderer
var breaks = calcBreaks(gasMin, gasMax, 4);
var sfs = esri.symbol.SimpleFillSymbol;
var sls = esri.symbol.SimpleLineSymbol;
var outline = sls("solid", new dojo.Color("#444"), 1);
var br = new esri.renderer.ClassBreaksRenderer(null, findGasPrice);
br.setMaxInclusive(true);
br.addBreak(breaks[0], breaks[1], new sfs("solid", outline, new dojo.Color([255, 255, 178, 0.75])));
br.addBreak(breaks[1], breaks[2], new sfs("solid", outline, new dojo.Color([254, 204, 92, 0.75])));
br.addBreak(breaks[2], breaks[3], new sfs("solid", outline, new dojo.Color([253, 141, 60, 0.75])));
PHP Version 5.4.11
System Darwin condor.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 12:13:47 PDT 2012; root:xnu-2050.20.9~1/RELEASE_X86_64 x86_64
Build Date Feb 14 2013 08:22:59
Configure Command './configure' '--prefix=/usr/local/Cellar/php54/5.4.11' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/5.4' '--with-config-file-path=/usr/local/etc/php/5.4' '--with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d' '--with-iconv-dir=/usr' '--enable-dba' '--with-ndbm=/usr' '--enable-exif' '--enable-soap' '--enable-wddx' '--enable-ftp' '--enable-sockets' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-mbstring' '--enable-mbregex' '--enable-bcmath' '--enable-calendar' '--with-zlib=/usr/local/Cellar/zlib/1.2.7' '--with-ldap' '--with-ldap-sasl=/usr' '--with-xmlrpc' '--with-kerberos=/usr' '--with-xsl=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/Cellar/freetype/2.4.10' '--with-jpeg-dir=/usr/
[PropelException]
[wrapped: connect failed [Native Error: Operation timed out] [User Info: Array]]
stack trace
at ()
in SF_ROOT_DIR/lib/symfony/plugins/sfPropelPlugin/lib/vendor/propel/Propel.php line 489 ...
try {
$con = Creole::getConnection($dsn);
This file has been truncated, but you can view the full file.
condor:tixcast derek$ ./sg bootstrap
[MSG] Using SUDO to install python requirements
[MSG] Please install using Homebrew or some other package manager
This script is destructive, and you
should ensure you have committed all
work before continuing.
Are you sure you want to continue? [y/n]
yThis script is destructive, and you
@swingley
swingley / index.html
Last active December 14, 2015 07:29
Nice Nice JPG! in an esri js api map popup.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Nice Nice Popup</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css">
<style>
html, body, #map {
@swingley
swingley / index.html
Created February 27, 2013 19:06
Nice Nice JPG! in an esri JS API map popup.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Nice Nice Popup</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css">
<style>
html, body, #map {
@swingley
swingley / gist:5807614
Created June 18, 2013 17:43
Bookmarklet to go from github pages to associated repo.
javascript:(function() {var w=window.location;window.location="https://github.com/"+w.hostname.split(".")[0]+"/"+w.pathname.split("/")[1];})();
@swingley
swingley / dojoConfig-paths-vs-packages.js
Created June 21, 2013 17:36
dojoConfig.packages vs. dojoConfig.paths
// helpful for understanding dojoConfig.packages vs. dojoConfig.paths:
// http://www.sitepen.com/blog/2013/06/20/dojo-faq-what-is-the-difference-packages-vs-paths-vs-aliases/
var dojoConfig = {
paths: {
extras: location.pathname.replace(/\/[^/]+$/, "") + "/extras"
}
var dojoConfig = {
packages: [{
"name": "extras",
@swingley
swingley / index.html
Created July 26, 2013 16:48
simple renderer to and from json comparison
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<style>
body {
@swingley
swingley / index.html
Created July 26, 2013 16:49
get simple renderer from a map on arcgis.com, use it to symbolize map click points
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="//js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #map {