Go To: https://labs.play-with-docker.com
Check if swarm mode is active
$ docker system info | grep Swarm| Architecture Type | Infrastructure Costs | Development Overhead | Maintenance Complexity | Time to Market | |
|---|---|---|---|---|---|
| Monolith | $$ (Medium) | $ (Low) | $ (Low) | Fast | |
| Modular Monolith | $$ (Medium) | $$ (Medium) | $$ (Medium) | Medium | |
| Microservices | $$$ (High) | $$$ (High) | $$$ (High) | Slow |
| func Test$suite_name$Suite(t *testing.T) { | |
| suite.Run(t, new($suite_name$TestSuite)) | |
| } | |
| type $suite_name$TestSuite struct { | |
| suite.Suite | |
| } | |
| func (suite *$suite_name$TestSuite) SetupSuite() { |
Go To: https://labs.play-with-docker.com
Check if swarm mode is active
$ docker system info | grep Swarm| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'digest/md5' | |
| require 'pp' | |
| begin | |
| require 'faker' | |
| rescue LoadError | |
| puts "You should install faker gem. (gem install faker)" | |
| exit |
| package main | |
| import "fmt" | |
| func main() { | |
| FuncChain("a")("a", "b")("a", "b", "c") | |
| } | |
| func FuncChain(a string) func(a, b string) func(a, b, c string) { | |
| return firstFunc |
| #!/usr/bin/perl | |
| use strict; | |
| my @newargs = ( "ssh" ); | |
| my $added = 0; | |
| for my $arg (@ARGV) { | |
| # replace "scp" with "sudo scp" | |
| if ($arg =~ /^scp / and $added == 0) { | |
| $arg =~ s/^/sudo /; | |
| $added = 1; | |
| } |
| { | |
| "Use Non-ASCII Font" : true, | |
| "Tags" : [ | |
| ], | |
| "Ansi 12 Color" : { | |
| "Red Component" : 0.5372549295425415, | |
| "Color Space" : "sRGB", | |
| "Blue Component" : 0.96470588445663452, | |
| "Alpha Component" : 1, |
| commands: | |
| create_post_dir: | |
| command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post" | |
| command: "mkdir /opt/elasticbeanstalk/hooks/postinit" | |
| ignoreErrors: true | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root |
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
| ^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|\*|x\.?|ext\.?|extension)\s*(\d+))*?$ | |
| # Validates below mention kind of phone number | |
| (555)-555-5555 | |
| 555-555-5555 | |
| +1-555-532-3455 | |
| 866-804-5742x5111904x1212x21212 | |
| 866-804-5742*1*5111904 |