Skip to content

Instantly share code, notes, and snippets.

View Brimizer's full-sized avatar

Daniel Brim Brimizer

  • Amazon.com
  • Seattle, WA
View GitHub Profile
@veselosky
veselosky / s3gzip.py
Last active May 8, 2023 21:42
How to store and retrieve gzip-compressed objects in AWS S3
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@marcelofabri
marcelofabri / xopen
Last active July 11, 2016 21:34
Open .xcworkspace file if exists or .xcodeproj otherwise. Useful for CocoaPods users. Found it elsewhere, but I can't find it anymore.
#!/usr/bin/env ruby
require 'shellwords'
proj = Dir['*.xcworkspace'].first
proj = Dir['*.xcodeproj'].first unless proj
if proj
puts "Opening #{proj}"
`open #{proj}`
@igniteflow
igniteflow / git_python_current_branch.py
Created February 7, 2012 17:33
GitPython get current active branch
"""
Gets the name of the active Git branch as a string.
Depends on GitPython
pip install GitPython
"""
from git import Repo
repo = Repo('/path/to/your/repo')
branch = repo.active_branch