Skip to content

Instantly share code, notes, and snippets.

@swingley
swingley / gist:6f99328071c10fb53598
Created January 18, 2016 19:01
Bookmarklet that tries to go from github repo to associated gh-pages. The opposite of https://gist.github.com/swingley/5807614.
javascript:(function() {var w = window.location;var p = w.pathname.split('/');window.location='http://'+p[1]+'.github.io/'+p[2]+'/';})();
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
@swingley
swingley / index.html
Created July 26, 2013 17:21
load class breaks renderer from a map on arcgis.com, build boxes from map clicks and use class breaks renderer to symbolize boxes
<!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 {
@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 {
@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 / 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 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 / 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 {
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
should ensure you have committed all
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/