database-sizes.sql
- To determine the sizes of all of your databases.table-sizes.sql
- To determine the sizes of all of the tables in a specific database. Replacedatabase_name
with the name of the database that you want to check.new-database-with-user.sql
- To create a new database and a user that has access to that database.
# As used with CanCan and Devise | |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
include ErrorResponseActions | |
rescue_from CanCan::AccessDenied, :with => :authorization_error | |
rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found | |
before_filter :authenticate! |
You can simply attach backgroung with CSS to layer below, that when iframe will be ready it will overlap your backgroung with spinner
Annotator.Plugin.Example = function (element, options) { | |
var myPlugin = {}; | |
myPlugin.pluginInit = function () { | |
// This annotator instance | |
this.annotator | |
// LOADING | |
.subscribe("annotationsLoaded", function (annotations) { | |
console.log("annotationsLoaded called when the annotations have been loaded."); | |
console.log(annotations); |
verify-weave.sh
- Goes through all weave pods in the cluster, computes a checksum on the 'status ipam' list and tells you if there are any weave pods that disagree on their peer list. It was used this to identify the different groups of pods in the cluster and decide which we wanted to preserve and which ones we wanted to reset/restart. Another quick script
bump-weave.sh
- Used to remove the db file and restart for those weave pods we wished to reset.
# modified from https://github.com/stefanprodan/k8s-prom-hpa/blob/617a98c5d921c3413599bbbb1438dfb125e3bd21/Makefile | |
SHELL=bash | |
UNAME := $(shell uname) | |
PURPOSE:=custom-metrics-adapter | |
SERVICE_NAME:=custom-metrics-apiserver | |
ALT_NAMES:="custom-metrics-apiserver.kube-system","custom-metrics-apiserver.kube-system.svc" | |
SECRET_FILE:=custom-metrics-adapter-serving-certs.yml | |
certs: gensecret rmcerts |
<p>Hello!</p> | |
<div> | |
<%= @message %> | |
</div> | |
<p>-- <%= @fullname %> (<%= @email %>)</p> |
Replace the Auth options hash value having token: <TOKEN_FOR_TESTING_THAT_LASTS_FOR_A_DAY>
with an actual token. This token can be generated by the server side scripts and copied in. It supercedes the tokenUrl:
if set.
Just to be 100% sure, feel free to verify the validity of the JSON Web Token generated using jwt.io, JWT debugger. Oh, and the TTL is set to 86400 which is a day. Enough time to generate a token and play around with it.
Ps: If there are any amendments that I can make to improve clarity or fix issues, feel free to leave a comment below. I'll get a notification and act on it as soon as I can.
Ps 2: I was experiencing an issue with CORS and so I submitted the issue (and this code) to the annotator-dev mailing list. Check the July 2014 archives for an email with the subject ... '[annotator-dev] Integrating Site With AnnotateIt Store'.
Running ./test.sh
gives the below output:
test1 is empty
test2 is set (empty string)
test3 is set (has string though)
test4 is not set (does not exist at all)