Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Chesal ianchesal

View GitHub Profile
@ianchesal
ianchesal / breathalyzer
Last active Aug 29, 2015
breathalyzer -- Run Rubocop on Changed Files in a Git-Managed Directory
View breathalyzer
#!/usr/bin/env ruby
##
# Runs rubocop on just the modified and new files in a repoistory. Handy for
# checking your compliance before you commit. It only runs against files that
# end in .rb. Maybe it should do more than that?
#
# Easy to run. In a dirty working directory:
#
# breathalyzer
@ianchesal
ianchesal / .rubocop.yml
Created May 18, 2014
My ~/.rubocop.yml file
View .rubocop.yml
########
# My ~/.rubocop.yml file
#
# Rubocop: https://github.com/bbatsov/rubocop#installation
MethodLength:
Enabled: false
LineLength:
Max: 160
View terminal_fonts.md

Melso

Like Menlo but it has a dotted zero a slightly nicer kerning and spacing. Menlo refined if you like.

@ianchesal
ianchesal / gist:3316a7fd5466e01871e6
Created Sep 16, 2014
Debugging 1Password extension problem with browser signature verification
View gist:3316a7fd5466e01871e6
○ → codesign -dvvv /Applications/Google\ Chrome.app
Executable=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Identifier=com.google.Chrome
Format=bundle with Mach-O thin (i386)
CodeDirectory v=20100 size=186 flags=0x0(none) hashes=3+3 location=embedded
Hash type=sha1 size=20
CDHash=a8d3a44cc2a7957e8d9cd9c6f6eb9124a7e4a9fd
Signature size=8507
Authority=Developer ID Application: Google Inc.
Authority=Developer ID Certification Authority
View gist:68fd7f9d5c7f1c5ff2e2
module AuthHelper
def http_login
user = 'username'
pw = 'password'
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw)
end
end
module AuthRequestHelper
#
@ianchesal
ianchesal / brew_list_versions.txt
Created Jul 26, 2019
Currently installed brew packages
View brew_list_versions.txt
❯ brew list --versions
adns 1.5.1
aom 1.0.0
autoconf 2.69
awscli 1.16.200
bash-completion 1.3_3
bat 0.11.0_1
cairo 1.16.0_2
exiftool 11.57
ffmpeg HEAD-2d900d8_1
@ianchesal
ianchesal / bitbucket2github.sh
Created Jul 17, 2020
Convert a bitbucket repository to a github repository
View bitbucket2github.sh
#!/bin/sh
# Usage:
#
# cd ~/src/some-bitbucket-repo
# ~/bin/bitbucket2github.sh
#
# The script assumes the name of the directory is the name
# of the repository that you want to use on github.com.
You can’t perform that action at this time.