Skip to content

Instantly share code, notes, and snippets.

View pcarolan's full-sized avatar

Patrick Carolan pcarolan

View GitHub Profile
@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

@pcarolan
pcarolan / README.md
Last active October 7, 2016 23:59 — forked from tommct/README.md
How to get pyodbc to run with freetds on Mac

After spending many hours trying to get FreeTDS and unixodbc to run on a Mac OS X 10.8 system with the python module, pyodbc, I eventually came to this recipe, which is remarkably simple thanks to homebrew. I also found unixodbc was unnecessary and I couldn't get it to play well with FreeTDS, so this install does not include unixodbc. See also http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/ and http://www.cerebralmastication.com/2013/01/installing-debugging-odbc-on-mac-os-x/.

Prerequisites: Be sure you have XCode and the Commandline Tools for XCode installed from Apple. Also install homebrew followed with brew update and brew doctor.

Install FreeTDS:

brew install freetds

Test your install: