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
| import base64 | |
| import json | |
| import sys | |
| import urllib.parse | |
| from urllib.request import Request | |
| from urllib.request import urlopen | |
| print("Collecting parameters...") | |
| organization_name, project_id, user_with_token = sys.argv[1], sys.argv[2], sys.argv[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
| #!/bin/bash | |
| # https://askubuntu.com/a/1178685 | |
| # Args | |
| INTERFACE=$1 | |
| ACTION=$2 | |
| # Check if the OpenVPN interface will be indeed tun0! | |
| if [ "$INTERFACE" = "tun0" ]; then |
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
| while read line; do | |
| if [[ $line =~ ^([a-z]|[A-Z]).+ ]]; then | |
| echo "Settings the following ==> $line" | |
| echo "$line" >> $GITHUB_ENV | |
| fi | |
| done < .env.development |
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
| require 'cgi' | |
| require 'socket' | |
| require 'logger' | |
| require 'json' | |
| require 'faker' | |
| logger = Logger.new(STDERR) | |
| server = TCPServer.new(ENV.fetch('PORT', 8000).to_i) | |
| time_to_be_delayed = ENV.fetch('DELAY_ANSWER_IN_SECONDS', 1).to_i |
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
| import sys | |
| from json import load | |
| from urllib.request import urlopen | |
| # $(Build.Repository.Name) is expected as parameter | |
| organization, app_name = sys.argv[1].split("/") | |
| env_should_publish = "ENV_SHOULD_PUBLISH" | |
| def return_line_which_has_value(file_name: str, value_to_be_found: str) -> str: |
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
| function docker_tag_exists() { | |
| if [[ $# -lt 2 ]]; then | |
| echo "Usage: $( basename $0 ) <repository-name> <image-tag>" | |
| exit 1 | |
| fi | |
| IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )" | |
| if [[ $? == 0 ]]; then | |
| echo $IMAGE_META |
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
| import os | |
| import sys | |
| branch_name: str = sys.argv[1] | |
| print(f"Received argument: {branch_name}") | |
| env_image_type = "ENV_IMAGE_TYPE" | |
| def set_value(key, value): | |
| print(f"Set key {key} as {value}") |
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
| import json | |
| import sys | |
| import urllib.request | |
| def set_value(key, value): | |
| print(f"Set key {key} as {value}") | |
| print(f"##vso[task.setvariable variable={key};]{value}") | |
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
| import os | |
| import sys | |
| from runpy import run_module | |
| import django | |
| from django.core import management | |
| print(f"Python {sys.version} on {sys.platform}") | |
| print(f"Django {django.get_version()}") | |
| print(f"Current dir: {os.getcwd()}") |
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
| package br.com.globo.aop; | |
| import org.aspectj.lang.annotation.Aspect; | |
| import org.aspectj.lang.annotation.Pointcut; | |
| import org.springframework.stereotype.Component; | |
| @Aspect | |
| @Component | |
| public class PointCuts { |
NewerOlder