This file contains 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
""" | |
EJEMPLOS: | |
get_round(2.25) | |
Out[3]: 2.5 | |
get_round(2.30) | |
Out[4]: 2.5 | |
get_round(2.55) | |
Out[5]: 3.0 | |
""" |
This file contains 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
""" | |
MIT License | |
Copyright (c) 2021 fabidick22 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains 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 boto3 as b3 | |
cf_b3 = b3.client("cloudformation", region_name="us-east-1") | |
def get_all_stacks(): | |
""" | |
Function to get all stacks. | |
:return: (dict) Dict object | |
""" |
This file contains 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
const express = require('express'); | |
const server = express(); | |
const options = { | |
index: ['index.html','hostingstart.html'] | |
}; | |
server.use('/', express.static(__dirname, options)); | |
server.get('/*', (req, res) => { | |
res.sendFile(__dirname + "/" + options.index[1]); |
This file contains 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
from datetime import datetime | |
from urllib.error import URLError, HTTPError | |
from urllib.parse import urlencode | |
from urllib.request import Request, urlopen | |
import json | |
import os | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) |
This file contains 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
# More details: https://github.com/maverick9000/zsh2000 | |
CURRENT_BG='NONE' | |
SEGMENT_SEPARATOR_RIGHT='\ue0b2' | |
SEGMENT_SEPARATOR_LEFT='\ue0b0' | |
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" | |
ZSH_THEME_GIT_PROMPT_DIRTY='' | |
ZSH_THEME_GIT_PROMPT_STASHED=' ⚑' | |
ZSH_THEME_GIT_PROMPT_DIVERGED=' ⚡' |
This file contains 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
AWS_EXECUTION_ENV=AWS_ECS_EC2 | |
# more details about this endpoints: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html | |
ECS_CONTAINER_METADATA_URI_V4=http://1.2.3.4/v4/291b4307-more-token | |
ECS_CONTAINER_METADATA_URI=http://1.2.3.4/v3/291b4307-more-token |
This file contains 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
MINIO_PORT=9000 | |
MINIO_BUCKET_NAME=aws-bucket-name | |
MINIO_REGION=us-east-1 | |
#Custom user and password | |
MINIO_ROOT_USER=mySuperUser | |
MINIO_ROOT_PASSWORD=mySuperPasswd123! | |
FILESYSTEM_DEFAULT=minio |
This file contains 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
mkdir /home/ubuntu/sobreplanos | |
aws s3 cp s3://sobreplanos-boilerplate/artifacts/sobreplanos.zip /home/ubuntu/sobreplanos.zip | |
cd /home/ubuntu/ | |
unzip sobreplanos.zip -d sobreplanos | |
rm -rf sobreplanos.zip | |
cd sobreplanos | |
chown -R ubuntu:ubuntu /home/ubuntu | |
export PATH="/usr/share/rvm/rubies/ruby-2.6.8/lib/ruby/gems/2.6.0:/usr/share/rvm/gems/ruby-2.6.8@sobreplanos:/usr/share/rvm/gems/ruby-2.6.8@global/bin:/usr/share/rvm/rubies/ruby-2.6.8/bin:/usr/share/rvm/bin:/home/ubuntu/.nvm/versions/node/v14.15.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/sobreplanos/bin:$PATH" | |
echo "##### INSTALL" | |
RAILS_ENV=production bundle install |
This file contains 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
#!/usr/bin/env python3 | |
import urllib.request | |
import urllib.parse as req_parse | |
import os | |
import json | |
GITHUB_API = os.getenv("GITHUB_API", "https://api.github.com/{}") | |
RUNNER_SCOPE = os.getenv("GITHUB_API", "repo") | |
GITHUB_OWNER = os.getenv("GITHUB_OWNER") |
OlderNewer