Skip to content

Instantly share code, notes, and snippets.

View pcarolan's full-sized avatar

Patrick Carolan pcarolan

View GitHub Profile
@pcarolan
pcarolan / goodtimes-privacy.md
Created September 2, 2026 13:58
good times privacy policy

good times — Privacy Policy

Effective: September 2, 2026

good times is a clock app for macOS that shows a 24-hour watch face with local sunrise, sunset, and precipitation.

What the app uses

  • Location. With your permission, the app reads your device's location to determine your timezone and to look up sunrise, sunset, and hourly precipitation for where you are. If you decline, the app falls back to an approximate location estimated from your IP address.
@pcarolan
pcarolan / Generating H3 hexgrid shapefiles
Last active January 31, 2021 07:41
Generate H3 hexgrid shapefiles
```python
# Imports
from h3 import h3
import folium
from shapely import geometry
import fiona
import geopandas as gpd
@pcarolan
pcarolan / kubectl-shortcuts.sh
Created January 6, 2019 16:46 — forked from tamas-molnar/kubectl-shortcuts.sh
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
<!DOCTYPE html>
<meta charset="utf-8">
Hello, world!
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An Address following the convention of http://microformats.org/wiki/hcard",
"type": "object",
"properties": {
"post-office-box": { "type": "string" },
"extended-address": { "type": "string" },
"street-address": { "type": "string" },
"locality":{ "type": "string" },
"region": { "type": "string" },
@pcarolan
pcarolan / activity.json
Last active October 7, 2016 23:25
Calendar Graph
[
{"created_at": "2016-10-06T16:22:24.520Z"},
{"created_at": "2016-10-05T16:24:39.039Z"},
{"created_at": "2016-10-04T16:24:39.039Z"},
{"created_at": "2016-10-02T16:24:39.039Z"},
{"created_at": "2016-10-01T16:24:39.039Z"},
{"created_at": "2016-09-25T16:24:39.039Z"},
{"created_at": "2016-09-24T16:24:39.039Z"},
{"created_at": "2016-09-23T16:24:39.039Z"},
{"created_at": "2016-09-22T16:24:39.039Z"},
@pcarolan
pcarolan / NERDTree.mkd
Created January 8, 2016 20:32 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

Identifying Arbitrage Opportunities with Graphs


Introduction

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps