$ microk8s enable registry
# or if you want to specify the amount of storage to be added. E.g., to use 40Gi:
$ microk8s enable registry:size=40Gi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* I figured out you can fit a Shelly 1 inside the case of many outdoor motion sensors. | |
* Coupled with that fact that recently, Shelly added a feature to de-couple the switch from the relay | |
* so they act independently, makes this a great combo! Simply wire the output of the PIR motion sensor | |
* (the wire that normally goes to your outdoor light) to the switch input of the Shelly and wire | |
* the lightbulb to the L output of the Shelly. Then, in the Shelly app or directly via the devices webpage, | |
* select the button type as 'Detached Switch' and use the code below to make it work normally. | |
* Don't forget to adjust the daylight sensitivity to full daylight if you want the motion detection to work 24/7. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler" | |
bundle = Bundler::LockfileParser.new(Bundler.read_file(Bundler.default_lockfile)) | |
gem_name_version_map = bundle.specs.map { |spec| | |
[ | |
spec.name, | |
spec.version.to_s, | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum PatchLevel { | |
MAJOR, MINOR, PATCH | |
} | |
class SemVer implements Serializable { | |
private int major, minor, patch | |
SemVer(String version) { | |
def versionParts = version.tokenize('.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: fluentd | |
spec: | |
template: | |
metadata: | |
labels: | |
app: logging |
In Tomcat you can use the PersistentManager in order to swap active (but idle) sessions out to a persistent storage mechanism, as well as to save all sessions across a normal restart of Tomcat. Moreover, the JAASRealm is an implementation of the Tomcat Realm interface that authenticates users through the Java Authentication & Authorization Service (JAAS) framework.
However, the problems start when the PersistentManager deserializes the persisted sessions but the built in JAAS authenticators are not able to find any user principal in those sessions and as a result the user is asked to provide their credentials. The cause of the problem is that as it has been documented in the org.apache.catalina.session.StandardSession class:
/**
* The authenticated Principal associated with this session, if any.
* <b>IMPLEMENTATION NOTE:</b> This object is <i>not</i> saved and
* restored across session serializations!
*/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Detect operating system in Makefile. | |
# Author: He Tao | |
# Date: 2015-05-30 | |
OSFLAG := | |
ifeq ($(OS),Windows_NT) | |
OSFLAG += -D WIN32 | |
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) | |
OSFLAG += -D AMD64 | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before do |scenario| | |
enable_accessibility | |
@calabash_launcher = Calabash::Cucumber::Launcher.new | |
unless @calabash_launcher.calabash_no_launch? | |
@calabash_launcher.relaunch | |
@calabash_launcher.calabash_notify(self) | |
end | |
end |
NewerOlder