Skip to content

Instantly share code, notes, and snippets.

View amarinelli's full-sized avatar
😅

Adam Marinelli amarinelli

😅
View GitHub Profile

The Spatial Community - Code of Conduct

The Spatial Community Date Posted: 7/26/2016, Last Updated: 8/08/2016

Version 1.05

Creating a Culture of Innovation

We aspire to create a culture where people work joyfully, communicate openly about things that matter, and collaborate on projects. We would like our community to reflect the diversity of the wider community of geospatial and IT professionals. We want to foster diversity of all kinds—not just the classes protected in law. Diversity fosters innovation. Diverse teams are creative teams. We need a diversity of perspective to create solutions for the real and urgent challenges we face.

@raykendo
raykendo / LayerListModified.js
Last active March 24, 2016 14:48
ArcGIS JSAPI Hack: LayerList fixes
define([
"dojo/_base/declare",
"dojo/_base/array",
"dojo/query",
"put-selector/put",
"esri/dijit/LayerList"
], function (declare, arrayUtils, dojoQuery, put, LayerList) {
return declare([LayerList], {
@celoyd
celoyd / hi8-anim-howto.md
Last active August 1, 2022 15:37
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@danielalvarenga
danielalvarenga / terminal-colors-branch.sh
Last active July 3, 2024 08:16
Show branch in terminal Ubuntu
# Add in ~/.bashrc or ~/.bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
NO_COLOR="\[\033[00m\]"
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@dt
dt / client.nut
Last active November 23, 2020 19:43
Coffee Monitor Imp
light <- hardware.pin8;
light.configure(ANALOG_IN);
was_brewing <- false;
brew_light <- 45000;
poll_time <- 30;
skip_updates <- 10;
until_heartbeat <- 0;
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@ghisprince
ghisprince / pprint_fields.py
Created August 7, 2014 18:25
pretty print table's fields
import arcpy
def pprint_fields(table):
""" pretty print table's fields and their properties """
def _print(l):
print("".join(["{:>12}".format(i) for i in l]))
atts = ['name', 'aliasName', 'type', 'baseName', 'domain',
'editable', 'isNullable', 'length', 'precision',
'required', 'scale',]
_print(atts)
for f in arcpy.ListFields(table):

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@turicas
turicas / email_utils.py
Last active April 9, 2024 19:56
Send emails easily in Python (with attachments and multipart)
#!/usr/bin/env python
# coding: utf-8
# This little project is hosted at: <https://gist.github.com/1455741>
# Copyright 2011-2020 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText