Skip to content

Instantly share code, notes, and snippets.

Thomas Metzmacher thomet

Block or report user

Report or block thomet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thomet
thomet / progress_bar.rb
Last active Aug 27, 2019
A simple progress bar script to load directly in ruby
View progress_bar.rb
# @example Usage
# require 'open-uri'
# eval(open('https://gist.githubusercontent.com/thomet/474bd082e15705fdba2906a9f4ca360a/raw/5ed83ff172a408601232d5306cf214ba3bd75775/progress_bar.rb') {|f| f.read })
#
# progress_bar(1_000) do
# # do something
# end
#
# > Progress [======================================================== 56.90 % \ (~43 seconds)
@thomet
thomet / INSTALL.md
Last active Sep 4, 2018 — forked from skanev/rubocop.rb
A Rubocop wrapper that checks only added/modified code
View INSTALL.md

Click on the Raw button for the myrubocop.rb and copy the url.

> curl <insert raw url here> > ~/.bin/myrubocop
> chmod +x ~/.bin/myrubocop
View gac_spec.plugin.zsh
# Clone this repo into you $ZHS_CUSTOM/plguins folder and enable it as plugin in your ~/.zshrc
#
# Clone
# > git clone https://gist.github.com/729dbb4216c9461eeb77e7aa7bc3e748.git $ZSH_CUSTOM/plugins/gac_spec
#
# Enable plugin in ~/.zshrc (if you have other plugins enabled, add gac_spec to your list)
# plugins=(gac_spec)
#
# All credits to [@thomet](https://github.com/thomet)
View pre-commit-combined.rb
#!/usr/bin/env ruby
require 'rubocop'
module DirtyCop
extend self # In your face, style guide!
def bury_evidence?(file, line)
!report_offense_at?(file, line)
end
@thomet
thomet / github_count.10m.rb
Created Jan 23, 2017
BitBar plugin: Amount of Github PR's and Commits for a specific search term
View github_count.10m.rb
#!/usr/bin/env ruby
#
# <bitbar.title>Amount of Github PR's and Commits for a specific search term</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Thomas Metzmacher</bitbar.author>
# <bitbar.author.github>thomet</bitbar.author.github>
# <bitbar.desc>Shows the count of Github PR's and Commits which matches a specifc search term.</bitbar.desc>
# <bitbar.dependencies>ruby</bitbar.dependencies>
#
@thomet
thomet / open_squad_prs.10m.rb
Last active Jan 23, 2017
BitBar plugin: Not reviewed open Github PR's
View open_squad_prs.10m.rb
#!/usr/bin/env ruby
#
# <bitbar.title>Not reviewed open Github PR's</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Thomas Metzmacher</bitbar.author>
# <bitbar.author.github>thomet</bitbar.author.github>
# <bitbar.desc>Shows all not from you reviewed and open Github PR's for specific users.</bitbar.desc>
# <bitbar.dependencies>ruby</bitbar.dependencies>
#
View keybase.md

Keybase proof

I hereby claim:

  • I am thomet on github.
  • I am thomet (https://keybase.io/thomet) on keybase.
  • I have a public key ASDpwfbPAs5cXKIzhPQKy1Lz8I_SC6dyTJbUTL9TTpZ3jgo

To claim this, I am signing this object:

@thomet
thomet / string_diff.zsh
Created Jan 15, 2016
Color diff of two strings in zsh
View string_diff.zsh
function sdiff() {
wdiff <(echo "$1") <(echo "$2") | colordiff
}
@thomet
thomet / docker-only-with-volume.yml
Last active Aug 29, 2015
Docker only with a valume
View docker-only-with-volume.yml
#cloud-config
coreos:
units:
- name: format-ephemeral.service
command: start
content: |
[Unit]
Description=Formats the ephemeral drive
[Service]
View gist:2f33c6ccd683e702051f
* http://docker.com
* guides: https://docs.docker.com/installation/#installation
* Docker hub: http://hub.docker.com
# Useage of existiing images - jira example (all in one)
* docker pull cptactionhank/atlassian-jira:latest # pull the image from docker hub
* docker run -p 8080:8080 cptactionhank/atlassian-jira:latest # run's a container with a jira instance
* http://docker-host:8080/
# Useage of existing images - wordpress example (db and webserver)
You can’t perform that action at this time.