Skip to content

Instantly share code, notes, and snippets.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@odoe
odoe / mobilesample.html
Last active December 12, 2015 01:48
ArcGIS JS API Drawtoolbar example for mobile that provides a little bit more feedback for the user on a touch device.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<title>Maps Toolbar</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/mobile/themes/iPhone/iPhone.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/mobile/themes/buttons.css">
@mpriour
mpriour / .jshintrc
Last active November 2, 2016 15:46
JSHint Options for esri JSAPI development
{
// --------------------------------------------------------------------
// JSHint Configuration, esri jsapi
// only including options which differ from the standard default
// jshint [options][1] or those in the SublimeText [jshint plugin][2].
// When those 2 default references differ, the option is explictly included
//
// [1]: https://github.com/jshint/jshint/blob/2.x/examples/.jshintrc
// [2]: https://github.com/uipoet/sublime-jshint/blob/master/.jshintrc
// --------------------------------------------------------------------
@tmcw
tmcw / guide.md
Last active June 3, 2016 19:29
Whole Earth Guide

Whole Earth Guide

I'm not sure about this; GIS really got burned from being both a 'science' and a 'product' from the beginning, and there are blurry lines between what I think is essential and what I don't know because I never do it and am not a GIS person. Anyway.

A No-Bullshit Intro to Maps and GIS

  1. What Maps Are
  2. Data
  3. Information
  4. Transformation
#!/bin/bash
# Settings: edit these as needed
PROJECT_NAME="test"
OUTPUT_DIRECTORY="~/Documents/MapBox/export/"
# first change into TileMill code directory
cd /Applications/TileMill.app/Contents/Resources/
# hint: use http://bboxfinder.com/ to get bounds in lon/lat
@vitorbritto
vitorbritto / rm_mysql.md
Last active May 20, 2024 19:44
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 28, 2024 17:41
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@ajturner
ajturner / index.html
Created November 20, 2015 22:09
Esri Vector Tiles + Mapbox GL JS
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.4/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.4/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@adactio
adactio / formProgress.js
Created May 29, 2016 15:27
Show a progress bar with every form that has a method of POST. Particularly nice if there's a file upload involved.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function (win, doc) {
'use strict';
if (!win.XMLHttpRequest || !win.FormData || !win.addEventListener || !doc.querySelectorAll) {
// doesn't cut the mustard.
return;
}
function hijaxForm (formElement) {
var progressBar;
@dannguyen
dannguyen / fec-indiv2016-simplified.md
Last active August 28, 2020 17:53
Walkthrough of how to download the massive FEC individual contributions file for 2016, and filter it for spreadsheet usage

Fitting 2016 FEC campaign donor data into your humble spreadsheet

The 2016 U.S. Election is so hot and rich that even with a month to go, the Federal Election Commission has recorded 12.6 million individual campaign donations.

image

For comparison's sake, the 2014 cycle had just 2.1 million donors. And the last presidential cycle, 2012, had 3.3 million donors.

The bottom line is that we can't import all the data directly into Excel (nevermind Google Sheets). But we can at least import the subset of data that we need (under a million rows) without having to crack out a database.