etcdctl ls service
List all keys from directory
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
#include <ESP8266WiFi.h> | |
void setup(){ | |
Serial.begin(9600); | |
delay(500); | |
Serial.println(); | |
Serial.print("MAC: "); | |
Serial.println(WiFi.macAddress()); |
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
{ | |
"name": "", | |
"version": "0.1.0", | |
"private": true, | |
"scripts": { | |
"serve": "vue-cli-service serve", | |
"build": "vue-cli-service build", | |
"lint": "vue-cli-service lint" | |
}, | |
"dependencies": { |
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
#Give a list with N elements need to get 3 last elements from a list | |
# [1,4,2,4,1,2,3,5,6,3] | |
# The first solution that comes my head is iter about it and use append, pop or delete but | |
# there is a more elegant solution with a collection "datatypes" is an awesome feature. | |
import collections | |
numbers_list = [1,4,2,4,1,2,3,5,6,3] | |
last_three_numbers = collections.deque(numbers_list, 3) |
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
""" | |
Reference Python cookbook | |
If you have tuples an awesome feature is unpacking from python, sometimes you need to unpacking tuples without know the index. | |
x,y,z = (1,2) | |
This raise an error about | |
ValueError: need more than 2 values to unpack | |
This is because you are unpacking more than values that expect. |
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
-- To know if x column have elements repeated | |
SELECT `name_column`, COUNT(1) as CNT | |
FROM `name_column` | |
GROUP BY `n` | |
HAVING COUNT(1) >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
pipeline { | |
agent { dockerfile true } | |
environment{ | |
user=credentials('here-your-credential-from-jenkins-credentials') // To get credentials go credentials jenkins link and copy id credential. | |
} | |
options { | |
gitLabConnection('xxx') // Here go your connection with gitlab, you can set up it jenkins credentials, dont forget install plugin gitlab to jenkins | |
gitlabBuilds(builds: ['install', 'test', 'build','pre-deploy']) | |
} | |
triggers { |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.provider "virtualbox" do |vb| | |
# # Display the VirtualBox GUI when booting the machine | |
# vb.gui = true | |
# | |
# # Customize the amount of memory on the VM: | |
vb.memory = "700" |
d
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
version: 'Here your version' | |
services: | |
webserver: | |
networks: | |
name_network_here: | |
ipv4_address: '172.25.1.10' | |
ciserver: | |
networks: |