Skip to content

Instantly share code, notes, and snippets.

View juanitoddd's full-sized avatar

Juan David juanitoddd

View GitHub Profile
# 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!)
adamcharnock /
Created April 24, 2018 11:26
Python script to move all GitLab issues from one project to another
#!/usr/bin/env python3
import os
import gitlab
def main():
print("Logging into gitlab and fetching a list of projects...")
deviantony /
Last active July 7, 2024 01:37
Portainer HTTP API by example


This gist is now deprecated in favor of our official documentation: which contains up to date examples!


Please refer to the link above to get access to our updated API documentation and examples.

remarkablemark / draggable-example.js
Created December 17, 2016 04:13
Basic draggable example using vanilla JavaScript.
'use strict';
* Makes an element draggable.
* @param {HTMLElement} element - The element.
function draggable(element) {
var isMouseDown = false;
giordanocardillo /
Last active April 27, 2022 19:21
Installing pdf2htmlEX on Ubuntu Server 14.04
RESTORE=$(echo '\033[0m')
BOLD=$(echo '\033[1m')
GREEN=$(echo '\033[1;32m')
echo ${GREEN}
echo "------------------------------"
echo " Installing prerequisites "
echo "------------------------------"
kof /
Last active January 18, 2020 09:06
Action creator vs. reducer

When should you use action creator and when reducer?

Action creator

  • you need to have side effects
  • you need to read from store to decide what to do
  • you need to dispatch more than one action
  • action produced by action creator needs to contain all the data reducer can need to shape the components state


  • should not have any side effects
druellan / opengraph.template.html
Created December 29, 2015 16:56
Basic template for OpenGraph/Facebook metatags
<html prefix="og:">
<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="">
jonathanpmartins /
Last active July 28, 2019 03:14
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
Mte90 / owa.ino
Last active September 29, 2021 21:36
Web Server with Arduino Yun with CORS enabled
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)
Chaser324 /
Last active July 9, 2024 07:38
GitHub Standard Fork & Pull Request Workflow

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.

Creating a Fork

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