Skip to content

Instantly share code, notes, and snippets.

View calvinmetcalf's full-sized avatar

Calvin Metcalf calvinmetcalf

View GitHub Profile
@calvinmetcalf
calvinmetcalf / README.md
Last active February 7, 2024 06:39
arcpy tutorial

Let's make a tool!

import arcpy, os, tempfile

import is used to bring in another library, here we bring in:

  • arcpy which is the esri library and
  • os which for Operating system things
  • tempfile is for making temperary files
function pbkdf2(password, salt, iterations, len, hashType) {
hashType = hashType || 'sha1';
if (!Buffer.isBuffer(password)) {
password = new Buffer(password);
}
if (!Buffer.isBuffer(salt)) {
salt = new Buffer(salt);
}
var out = new Buffer('');
var md, prev, i, j;
{
"out": "./dist/proj4.js",
"baseUrl": ".",
"wrap": {
"startFile": "almond/top.frag",
"endFile": "almond/end.frag"
},
"name": "node_modules/almond/almond",
"include": ["proj4"],
"optimize":"uglify2",
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
@calvinmetcalf
calvinmetcalf / README.md
Created July 20, 2012 11:50
Using ESRI JSON in Leaflet

Basic example of taking an output from our server and putting it on a map. As leaflet allows you to add geoJSON directly, we convert it from esri's JSON format to a more standard one.

function makeFakeConsole(func){
return new Proxy({},{
get:function(target,name,receiver){
return function(){
//at some point if array.from gets implimented
//func(name,Array.from(arguments));
func(name,Array.prototype.slice.call(arguments));
}
}
});
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.PouchDB=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
"use strict";
var utils = _dereq_('./utils');
var merge = _dereq_('./merge');
var errors = _dereq_('./deps/errors');
var EventEmitter = _dereq_('events').EventEmitter;
/*
* A generic pouch adapter
*/
class PouchCore
constructor: (@remoteUrl,@onChange)->
if @remoteUrl.slice(0,4)=="http" #did we get a real url?
parts = @remoteUrl.split("/") #split the url bu by the slashes
@_dbName = parts.pop() #assign the last part as the db name
while @_dbName == "" #unless it is an empty string
@_dbName = parts.pop()#repeat until you find one
Pouch @_dbName, (e, db) => #making the local db
unless e #error would imply we are on an old browser
@db = db
Team Marble Role
Mellow Yellow Yellow Captain
Mellow Yellow Yelley Member
Mellow Yellow Yellah Member
Mellow Yellow Yellup Member
Mellow Yellow Yellim Reserve
Savage Speeders Speedy Captain
Savage Speeders Rapidly Member
Savage Speeders Swifty Member
Savage Speeders Velocity Member
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.