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.
--- | |
# | |
# Let first talk about the different types in YAML | |
# | |
# It is important to understand the differences and terms. | |
# Not just for configuration splitting, but in general! | |
# | |
# Scalar values: String, Integer, Float, Boolean, Null | |
# Comments | |
# Collections: List (sequence), Dictionary (mapping) (important for splitting!) |
#!/usr/bin/env python3 | |
import os | |
import gitlab | |
GITLAB_API_TOKEN = os.environ['GITLAB_API_TOKEN'] | |
def main(): | |
print("Logging into gitlab and fetching a list of projects...") |
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.
'use strict'; | |
/** | |
* Makes an element draggable. | |
* | |
* @param {HTMLElement} element - The element. | |
*/ | |
function draggable(element) { | |
var isMouseDown = false; |
#!/bin/sh | |
RESTORE=$(echo '\033[0m') | |
BOLD=$(echo '\033[1m') | |
GREEN=$(echo '\033[1;32m') | |
echo | |
echo ${GREEN} | |
echo "------------------------------" | |
echo " Installing prerequisites " | |
echo "------------------------------" | |
echo |
<html prefix="og: http://ogp.me/ns#"> | |
<head> | |
<title>The Title</title> <!-- ˜60 chars --> | |
<meta name="description" content="The Description"> <!-- ˜150 chars --> | |
<meta property="og:title" content="The Title"> | |
<meta property="og:description" content="The Description"> <!-- ˜300 chars --> | |
<meta property="og:site_name" content="Sfida Blog"> | |
<meta property="og:locale" content="es_AR"> | |
<meta property="og:type" content="website"> | |
<meta property="og:url" content="http://www.sfidastudios.com"> |
#!/bin/bash | |
sudo add-apt-repository ppa:chris-lea/libsodium; | |
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list; | |
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list; | |
sudo apt-get update && sudo apt-get install libsodium-dev; |
/* | |
It demonstrates how you can create your own API when using REST style | |
calls through the browser with CORS enabled. | |
Possible commands created in this shetch: | |
* "/arduino/digital/13" -> digitalRead(13) | |
* "/arduino/digital/13/1" -> digitalWrite(13, HIGH) | |
* "/arduino/analog/2/123" -> analogWrite(2, 123) |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j