Skip to content

Instantly share code, notes, and snippets.

View invalidusrname's full-sized avatar
🤷‍♀️

Matt invalidusrname

🤷‍♀️
View GitHub Profile
@invalidusrname
invalidusrname / docker.sh
Created April 11, 2014 19:23
docker misc commands
# docker cleanup
docker ps -a | grep Exit | awk '{ print $1 }' | xargs docker rm
docker images | grep none | awk '{ print $3 }' | xargs docker rmi
@invalidusrname
invalidusrname / expiring_certs.sh
Created April 18, 2014 20:56
get expiring certificates
for cert in `find /etc/ssl/certs | grep crt | sort`; do basename $cert; openssl x509 -noout -in $cert; openssl x509 -noout -in $cert -dates ; echo ''; done
@invalidusrname
invalidusrname / config.yml
Last active August 29, 2015 14:01
docker-registry config
# Set env vars for AWS_* when launching - this config will refer to them.
# To specify prod flavor, set the environment variable SETTINGS_FLAVOR=prod
# example launching with this config, in a docker image:
# docker run -p 5000:5000 -e SETTINGS_FLAVOR=prod -e AWS_KEY=X -e AWS_SECRET=Y -e AWS_BUCKET=images registry-image
common:
boto_bucket: _env:AWS_BUCKET
s3_access_key: _env:AWS_KEY
s3_secret_key: _env:AWS_SECRET
@invalidusrname
invalidusrname / cert_checker.rb
Last active August 29, 2015 14:14
Check certs
require 'net/https'
url = "https://www.google.com"
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.start { |h| @cert = h.peer_cert }
@cert
@cert.not_after

[APP NAME]

This is a short description of your app.

Getting Started

Requirements

Setup

@invalidusrname
invalidusrname / constant_check.rb
Created January 7, 2009 03:49
constants being loaded twice? Use this
RAILS_DEFAULT_LOGGER.debug(caller.join("\n")) if defined? SOME CONSTANT
@invalidusrname
invalidusrname / redmine post-receive hook
Created April 3, 2009 16:03
redmine post-receive hook
#!/bin/bash
#
# An example hook script for the post-receive event
#
# This script is run after receive-pack has accepted a pack and the
# repository has been updated. It is passed arguments in through stdin
# in the form
# <oldrev> <newrev> <refname>
# For example:
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
# $Id: Portfile 64302 2010-03-01 13:30:40Z ryandesign@macports.org $
PortSystem 1.0
PortGroup archcheck 1.0
name ImageMagick
conflicts cryptlib
version 6.6.0-0
set reasonable_version [lindex [split ${version} -] 0]
homepage http://www.imagemagick.org/
@invalidusrname
invalidusrname / .vimrc
Created August 31, 2011 19:06
Break habit of using arrow keys in vim
" Ignore arrow keys in vim
:map <Left> <Nop>
:map <Right> <Nop>
:map <Up> <Nop>
:map <Down> <Nop>
:map <PageUp> <Nop>
:map <PageDown> <Nop>
:map <Home> <Nop>
:map <End> <Nop>
@invalidusrname
invalidusrname / confreaks_curl.bash
Created September 7, 2011 02:21
Grab all available videos from confreaks
curl -s http://confreaks.com/events/rubyconf2012 | grep "/videos/" | cut -d '"' -f 2 | while read url; do curl -s "http://confreaks.com$url" | grep "large.mp4?" | grep -v "xtra" | cut -d '"' -f 2 >> /tmp/cf-vids.txt; done; cat /tmp/cf-vids.txt | uniq