Skip to content

Instantly share code, notes, and snippets.

NOTE: quay-devel
cd /quay-registry
supervisorctl -c /quay-registry/conf/supervisord.conf stop gunicorn-web
supervisorctl -c /quay-registry/conf/supervisord.conf stop repomirrorworker
mv static static.bak
ln -s /home/thomasmckay/code/quay-devel/static
cd /home/thomasmckay/code/quay-devel
mkdir -p static/webfonts
mkdir -p static/fonts
@thomasmckay
thomasmckay / example.js
Last active May 5, 2020 15:25
fvtt arrow example
/*
To run:
createArrows(wasd)
clearArrows()
*/
let name = "PintAndPie";
let user = game.users.entities.find(u => u.name.toLowerCase() === name.toLowerCase());
let token = canvas.tokens.placeables.find(t => t.name.toLowerCase() === name.toLowerCase());
let arrows = {};
#upstream
git clone https://github.com/quay/quay-docs.git
cd quay-docs
git remote add thomasmckay git@github.com:thomasmckay/quay-docs.git
^--- my "origin"
git checkout master
git fetch --all --prune
git merge origin/master
#!/usr/bin/env ruby
require 'json'
inspect_results = JSON.parse(`skopeo inspect #{ARGV[0]}`)
name = inspect_results['Name'].split('/')[-1]
Dir.mkdir(name) unless Dir.exist?(name)
https://docs.openshift.org/latest/minishift/getting-started/installing.html#installing-instructions
I think addons is git clone https://github.com/minishift/minishift/addons into minishift dir
########### Below is cut&paste to destroy and recreate minishift VM ##########################
minishift delete && rm -rf ~/.minishift ~/.kube/*
pushd addons
minishift addons install registry-route
"Name","Label","Description"
"Green Hat, Inc.","greenhat","Green cowboy hats"
@thomasmckay
thomasmckay / gist:9763814
Created March 25, 2014 15:10
hammer config.yml
:modules:
- hammer_cli_foreman
- hammer_cli_katello
- hammer_cli_csv
:csv:
:enable_plugin: true
:host: 'https://localhost:3000'
:username: 'admin'
:password: 'changeme'
+------------+------------+-----------+-----------+-----------+----------+
| Name | Consumed | Type | Starts | Expires | SLA |
+------------+------------+-----------+-----------+-----------+----------+
| Red Hat Enterprise Linux Server, Premium (8 sockets)(Up to 4 guests) |
| 1 of 17 Physical 12/13/13 6/13/14 Premium |
+------------+------------+-----------+-----------+-----------+----------+
| Red Hat Enterprise Linux Server, Premium (8 sockets)(Up to 4 guests) |
| 0 of 10 Physical 12/13/13 6/13/14 Premium |
+------------+------------+-----------+-----------+-----------+----------+
before_filter :find_system_group, :only => [:index]
before_filter :find_organization, :only => [:index]
before_filter :authorize
def rules
index_systems = lambda do
if @system_group
@system_group && @system_group.readable?

Activation Keys

Routes - config/routes/api/v2.rb

api_resources :activation_keys, :only => [:show, :index, :create, :update, :destroy] do
  api_resources :subscriptions, :only => [:show, :index, :create, :update, :destroy] do
    match '/available' => 'activatoin_keys#available_subscriptions', :via => :get
 end