Skip to content

Instantly share code, notes, and snippets.

View philvarner's full-sized avatar
💭
creating bugs

Phil Varner philvarner

💭
creating bugs
View GitHub Profile
@jkeifer
jkeifer / set-aws-secrets.sh
Last active September 20, 2023 14:51
Shell function to set/unset AWS session env vars from configured profiles (with SSO support)
set-aws-secrets() {
local profile_name="${1:?"must provide profile name"}"
local creds
creds=$(aws configure export-credentials --profile "${profile_name}")
rc=$?
if [ "${rc}" -eq 255 ]; then
# using sso and not logged in
local sso_session="$(aws configure get sso_session --profile "${profile_name}")"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lodestone
lodestone / HOWTO-Dissassociate-Xcode-From-All-File-Types.md
Created February 15, 2019 20:06
HOWTO: Dissassociate/Unassociate Xcode from ALL file types in one fell swoop!

HOWTO: Disassociate/Unassociate File Types From a Mac App

I got super tired of Xcode opening everything: .rb, .sh, etc etc etc....

Here is how to stop Xcode from opening everything!

NOTE: It may be helpful to know that I found the lsregister command right here:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister
@kelvinn
kelvinn / InstallPythonGDAL.md
Last active April 22, 2024 22:03
Installing GDAL (Python 3.6) on Mac OS X

How-To: Install GDAL Python Bindings

I've found two ways to install the GDAL Python bindings on Mac.

Via GDAL Framework / QGIS

First, you can install the GDAL Framework via QGIS (or get it directly), and then do...

@emadehsan
emadehsan / Screen Unix Cheat Sheet.md
Created April 18, 2018 11:52
Screen Linux/Unix command cheat sheet

Install Screen

$ sudo apt install screen

Enter a new Screen Session

$ screen

Detach from current screen session

@felicianotech
felicianotech / gist:56ad8f63156e233e6a16df50fe6d4791
Created August 22, 2017 23:02
Using AWS ECR with CircleCI 2.0 (docker executor)
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8-jdk
steps:
- checkout
- setup_remote_docker
- run:
name: install aws
@jedsundwall
jedsundwall / gist:7b5ea0a33cc3ca0b9764f7090a59858a
Last active October 29, 2019 14:14
Setting up a Public AWS SNS Topic

How to create a publicly-accessible SNS topic that sends messages when objects are added to a public Amazon S3 bucket.

1. Create something within AWS that triggers notifications.

In this case, that's an S3 bucket that is continually updated by the addition of new sensor data. For the purposes of this tutorial, we’ll use s3://noaa-nexrad-level2 – one of our NEXRAD on AWS buckets – as an example.

2. Create an SNS topic and appropriate policy.

The SNS topic should be in the same region as the bucket. It will need to have a policy that allows our S3 bucket to publish to it, and anyone to subscribe to it using Lambda or SQS.

@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active May 1, 2024 04:03
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@sgillies
sgillies / geo_interface.rst
Last active May 29, 2024 12:49
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@jsundram
jsundram / cull.py
Last active April 5, 2023 15:22
Check if lat long is inside the bounds of the continental US (box model, not shape)
# http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost
top = 49.3457868 # north lat
left = -124.7844079 # west long
right = -66.9513812 # east long
bottom = 24.7433195 # south lat
def cull(latlngs):
""" Accepts a list of lat/lng tuples.
returns the list of tuples that are within the bounding box for the US.
NB. THESE ARE NOT NECESSARILY WITHIN THE US BORDERS!