Skip to content

Instantly share code, notes, and snippets.

View opusmagnum's full-sized avatar

Alexander Dobriakov opusmagnum

View GitHub Profile
@dalethestirling
dalethestirling / README.md
Created September 2, 2016 10:19
Ansible Container HelloWorld

Ansible-continer HelloWorld

Here is a quick ansible-container HelloWorsld deployment running Nginx.

The config creates a single Centos 7 container running nginx exposed on port 8080.

This GIST assumes you have read the ansible-container docs and have a sucessful install of the app and its prerequisits.

Install

  1. Run ansible-container init
@codesword
codesword / minikube.md
Last active October 31, 2019 21:27
Installing minikube using xhyve driver

###Install docker-machine-driver-xhyve docker-machine-driver-xhyve is a docker machine driver plugin for xhyve native OS X Hypervisor. xhyve is a lightweight OS X virtualization solution. In my opinion, it's a far better option than virtualbox for running minikube. ####Brew On MacOS sierra, download latest using

brew install docker-machine-driver-xhyve --HEAD
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
@mortensteenrasmussen
mortensteenrasmussen / cleanupManifestsWithoutTags.sh
Last active September 9, 2024 08:12
Clean up untagged manifests in private docker registry
#!/bin/bash
REGISTRY_DIR=YOUR_REGISTRY_DIR/data/docker/registry/v2/repositories
REGISTRY_URL=http://10.10.10.10:5000
#add --insecure to the curl command on line 17 if you use https with self-signed certificates
cd ${REGISTRY_DIR}
count=0
manifests_without_tags=$(comm -23 <(find . -type f -name "link" | grep "_manifests/revisions/sha256" | grep -v "\/signatures\/sha256\/" | awk -F/ '{print $(NF-1)}' | sort) <(for f in $(find . -type f -name "link" | grep "_manifests/tags/.*/current/link"); do cat ${f} | sed 's/^sha256://g'; echo; done | sort))
@aseroff
aseroff / yard_customization.md
Last active April 27, 2023 18:48
YARD customization for Rails

So you're running a Rails application and want to spruce up your YARD documentation. Here's the guide I wish I had.

Step 0: Plugin

Add yard-activerecord and yard-activesupport-concern to your Gemfile, add --plugin activerecord and --plugin activesupport-concern to your .yardopts flags, and db/schema.rb to the end of your .yardopts sources. Your models' attributes and assocations should now be included in the documentation.

Step 1: CSS/JS

To modify your YARD template, create doc-src/templates/default/fulldoc/html, then add --template-path doc-src/templates to your project's .yardopts. You can now create a doc-src/templates/default/fulldoc/html/css/common.css and the styles will be included (but overwrites need to be !important).