Skip to content

Instantly share code, notes, and snippets.

@scmrus
scmrus / schematest.php
Created January 24, 2020 20:14 — forked from hakre/schematest.php
Speeding up XML schema validations of a batch of XML files against the same XML schema (XSD)
<?php
/**
* @link http://stackoverflow.com/questions/13865149/speeding-up-xml-schema-validations-of-a-batch-of-xml-files-against-the-same-xml
*/
$mapping = [
'http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd' => 'schema/xhtml1-transitional.xsd',
'http://www.w3.org/2001/xml.xsd' => 'schema/xml.xsd',
];
@scmrus
scmrus / install-docker.md
Created March 8, 2021 01:26 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@scmrus
scmrus / get-public-ip.md
Created December 2, 2022 16:22 — forked from rkalkani/get-public-ip.md
Get public IP address used by your machine to connect to the internet

Get Public IP

DNS

Google

dig o-o.myaddr.l.google.com txt @ns1.google.com +short
# OR
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.com
@scmrus
scmrus / traefik-compose.yml
Created July 9, 2024 15:38 — forked from Bmohsen/traefik-compose.yml
Traefik Compose file with http to https redirect enabled for all the routes for docker Swarm
version: "3.9"
services:
traefik:
# Use the latest v3.0.x Traefik image available
image: traefik:v3.0
ports:
# Listen on port 80, default for HTTP, necessary to redirect to HTTPS
- target: 80
published: 80
@scmrus
scmrus / docker-compose.base.yml
Created July 9, 2024 15:40 — forked from dimastbk/docker-compose.base.yml
traefik + portainer for docker swarm (and simple app with nginx)
version: "3.8"
services:
traefik:
image: traefik:v2.4.9
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
ports: