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
#include<stdlib.h> | |
#include<stdio.h> | |
#include<string.h> | |
int main(){ | |
char *buffer = NULL; | |
char palavra; | |
printf("Alocando memoria\n"); |
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
# Ref.: https://lucasmarques.me/create-ubuntu-user/ | |
# Add an user lucas and its home folder at /home/lucas | |
sudo useradd -d /home/lucas -m lucas | |
# Add a password for user lucas | |
sudo passwd lucas | |
# Make bash as default terminal | |
sudo usermod -s /bin/bash lucas | |
# Add lucas to sudoers group | |
sudo adduser lucas sudo |
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
class Rundeck(): | |
def __init__(self, api_token, url='http://127.0.0.1', port=4440): | |
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.DEBUG) | |
self.logger = logging.getLogger(__name__) | |
self.api_token = api_token | |
self.url = url | |
self.port = port | |
def listProjects(self): | |
""" API call to get the list of the existing projects on the server. """ |
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
""" | |
Ref.: https://lucasmarques.me/bypass-ssl/ | |
""" | |
# Before instantiate suds client | |
import ssl | |
try: | |
_create_unverified_https_context = ssl._create_unverified_context | |
except AttributeError: |
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
""" | |
Ref.: https://lucasmarques.me/bypass-ssl/ | |
""" | |
from requests import Session | |
from zeep.transports import Transport | |
from zeep import Client | |
session = Session() | |
session.verify = False |
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
telnet 127.0.0.1 11211 | |
flush_all | |
quit |
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
def shapeArea(n): | |
if n == 1: | |
return n | |
return shapeArea(n - 1) + 4 * (n - 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
def shapeArea(n): | |
result = 0 | |
while n > 1: | |
result += 4 * (n - 1) | |
n -= 1 | |
return result + 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
def hello(): | |
ola() | |
print("Hello!") | |
def ola(): | |
hola() | |
print("Olá!") | |
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 sys | |
RECURSION_LIMIT = 5500000 | |
# Não faça isso em prod :) | |
sys.setrecursionlimit(RECURSION_LIMIT) |
OlderNewer