Skip to content
View tyrelsouza's full-sized avatar

Sponsoring

@nkantar
@urllib3
@neovim
@nedbat
Block or Report

Block or report tyrelsouza

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
tyrelsouza/README.md

Pinned

  1. Copy git branch to your clipboard (n... Copy git branch to your clipboard (needs xsel or pbcopy installed)
    1
    function cpbr {
    2
      if branch=$(git symbolic-ref --short -q HEAD)
    3
      then
    4
        if command -v pbcopy 2>/dev/null; then
    5
           printf "$branch" | pbcopy 
  2. Import Keybase Keys you are Tracking... Import Keybase Keys you are Tracking into GnuPG
    1
    import gnupg
    2
    import urllib
    3
    from subprocess import Popen, PIPE
    4
    import os
    5
    from pprint import pprint
  3. Get GPG keys from Keybase Get GPG keys from Keybase
    1
    #!/bin/bash
    2
    keybase list-tracking | while read -r line ; do
    3
     if [ -n "$line" ]; then
    4
     	curl -s https://keybase.io/$line/key.asc  | gpg --with-fingerprint | sed -n 's/.*=//p' | awk 'NF>1{print $(NF-3)$(NF-2)$(NF-1)$(NF) }' | while read -r key; do
    5
     		echo "Trying $line's key: $key"
  4. calculate distance on unit sphere wi... calculate distance on unit sphere with lat long
    1
    def distance_on_unit_sphere(lat1, long1, lat2, long2):                          
    2
        #http://www.johndcook.com/python_longitude_latitude.html                    
    3
        degrees_to_radians = math.pi/180.0                                          
    4
        phi1 = (90.0 - lat1)*degrees_to_radians                                     
    5
        phi2 = (90.0 - lat2)*degrees_to_radians