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.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Copy Paste Events</title> | |
| <style> | |
| p span { | |
| font-style: italic; | |
| font-weight: 100; |
| //The Local API file code | |
| var api = (function(){ | |
| var prop1 = 'prop1'; | |
| var prop2 = 2; | |
| var prop3 = true; | |
| var prop4 = Date.now(); | |
| var prop5 = ['yes', 'no', 'maybe']; | |
| var init: function(){ | |
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.
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var argv = require('minimist')(process.argv); | |
| var prompt = require('gulp-prompt'); | |
| var rsync = require('gulp-rsync'); | |
| var sass = require('gulp-sass'); | |
| var autoprefixer = require('gulp-autoprefixer'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var browserSync = require('browser-sync'); | |
| var useref = require('gulp-useref'); |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /vagrant; | |
| index index.php index.html index.htm; | |
| location / { | |
| try_files $uri $uri $uri/ =404; |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| /* | |
| * Save a text file locally with a filename by triggering a download | |
| */ | |
| var text = "hello world", | |
| blob = new Blob([text], { type: 'text/plain' }), | |
| anchor = document.createElement('a'); | |
| anchor.download = "hello.txt"; | |
| anchor.href = (window.webkitURL || window.URL).createObjectURL(blob); |
| # | |
| # Copyright (C) 2013-2020 Vinay Sajip. New BSD License. | |
| # | |
| import os | |
| import os.path | |
| from subprocess import Popen, PIPE | |
| import sys | |
| from threading import Thread | |
| from urllib.parse import urlparse | |
| from urllib.request import urlretrieve |