Skip to content

Instantly share code, notes, and snippets.

View norcal82's full-sized avatar

Clint Bettiga norcal82

  • Northern California
View GitHub Profile
def itertar(tar):
while True:
n = tar.next()
if n is None:
break
else:
yield n
@lxe
lxe / goes16-rtlsdr.md
Last active November 14, 2024 16:14
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@bparaj
bparaj / howto_python_flask_iis_wfastcgi
Last active December 1, 2023 05:42
Python Flask on IIS with wfastcgi
Assume IIS is installed. My machine already had IIs 8.5.
Install Python
==============
1. Download web installer (Python 3.6.3).
2. Run as Administrator.
3. Select custom installation for all users.
4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
5. Check the box for "Add Python 3.6 to PATH".
@tonjadwyer
tonjadwyer / arcpy-table-to-dict.py
Created March 2, 2017 18:52
Read an ArcGIS table into a dictionary.
#Source: http://gis.stackexchange.com/questions/54804/fastest-methods-for-modifying-attribute-tables-with-python
# fc - is the full path name to table or feature class
def make_attribute_dict(fc, key_field, attr_list=['*']):
attdict = {}
fc_field_objects = arcpy.ListFields(fc)
fc_fields = [field.name for field in fc_field_objects if field.type != 'Geometry']
if attr_list == ['*']:
valid_fields = fc_fields
else:
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@sposmen
sposmen / ObjectFetch.js
Created March 2, 2016 15:25
Equivalent to Ruby hash fetch in Javascript
Object.prototype.fetch = function (key, value) {
return this.hasOwnProperty(key) ? this[key] : (value ? value : (function () {
throw new Error('key not found')
})());
};
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@cmmartin
cmmartin / moment-filter.js
Last active July 31, 2019 09:01
A generic Moment.js date filter for Angular.js
// REQUIRES:
// moment.js - http://momentjs.com/
// USAGE:
// {{ someDate | moment: [any moment function] : [param1] : [param2] : [param n]
// EXAMPLES:
// {{ someDate | moment: 'format': 'MMM DD, YYYY' }}
// {{ someDate | moment: 'fromNow' }}
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook