It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| import pprint | |
| def displayhook_pprint(o): | |
| """Display hook powered by pprint. | |
| https://www.python.org/dev/peps/pep-0217/ |
This file contains hidden or 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
| <?php | |
| /** | |
| * Continuation routing examples. Handles URLs in the following forms: | |
| * | |
| * /posts | |
| * /en/posts | |
| * /admin/posts | |
| * /admin/en/posts | |
| * /admin/en/posts.json | |
| * /admin/en/posts/4ef16ccc7f8b9aa331000064.json |
This file contains hidden or 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
| from discord.ext import commands | |
| description = '''An example bot to showcase the discord.ext.commands extension | |
| module. | |
| There are a number of utility commands being showcased here.''' | |
| # this specifies what extensions to load when the bot starts up | |
| startup_extensions = ["members", "rng"] |
This file contains hidden or 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
| {:paths ["."] | |
| :deps {clansi/clansi {:mvn/version "1.0.0"}}} |
This file contains hidden or 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
| # Simple example to deploy traefik with consul connect enabled. | |
| # For simplicity the job includes traefik as well as the backend service. | |
| # Please note that traefik currently only supports connect for HTTP. | |
| job "traefik-consul-connect-demo" { | |
| datacenters = ["dc1"] | |
| group "edge" { | |
| network { | |
| mode = "bridge" |
This file contains hidden or 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: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # REF: https://github.com/cloudflare/cfssl | |
| # Change working directory | |
| cd -- "$( | |
| dirname "${0}" | |
| )" || exit 1 | |
| readonly CA_ROOT_CERT_KEY="ca-root" |
This file contains hidden or 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
| # Installation on Dell XPS | |
| # Please also consult official docu: | |
| # https://wiki.archlinux.org/index.php/Installation_Guide | |
| # https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360) | |
| # https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550) | |
| # Boot from the usb. | |
| # F12 to enter boot menu | |
| # Connect to Internet |
This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!
Please refer to the link above to get access to our updated API documentation and examples.
OlderNewer