Comando | Descrição |
---|---|
git clone https://myrepositoryurl.com | Copia o repositório inteiro para o seu PC |
git add . | Marca todos os arquivos para serem comitados, este comando não comita os arquivos. |
git commit -m "My message here" | Comita todos os arquivos adicionados pelo comando git add |
git push | Envia todos os commits criados para o server |
git pull | Atualiza o seu repositório de acordo com o repositório do server |
git status | Mostra todos os arquivos que foram adicionados ou alterados |
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
/* Todas as funções async do js retornam sempre Promises. As Promises podem retornar algo | |
* ou não. Se você retornar uma string em um método async, será retornada uma Promise que | |
* resolve em uma string. | |
*/ | |
/* Só é possível usar a palavra await dentro de funções assincronas. */ | |
const axios = require('axios'); | |
const api = 'https://swapi.dev/api/'; |
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
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D |
If you want to debug HTTPS requests, you must execute, at any point of your code, these command:
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
Then, you must add the following lines to your web.config:
<system.net>
<defaultProxy enabled="true">
<proxy proxyaddress="http://127.0.0.1:8888" bypassonlocal="False"/>
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 simplegui | |
time = 0 | |
points = 0 | |
def format(time): | |
A = time // 600 | |
B = time // 60 | |
C = time % 60 |
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
quantity_commands = int(raw_input()) | |
lines = [] | |
for i in range(0, quantity_commands): | |
input = raw_input() | |
lines.append(input) | |
L = [] | |
for line in lines: | |
parameters = str.split(line) |
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
n = int(raw_input()) | |
my_new_list = [] | |
while n >= 0: | |
my_new_list.insert(0, 5) | |
my_new_list.insert(1, 10) | |
my_new_list.insert(0, 6) | |
print my_new_list | |
my_new_list.remove(6) | |
my_new_list.append(9) |
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
def calculate_average(verifide_notes): | |
float_list = map(float, verifide_notes) | |
average = sum(float_list)/float(len(float_list)) | |
return average |
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
n = int(raw_input()) | |
students_data = {} | |
for i in range(0,n): | |
#transforms each item of input in a string that contain de name of a student and their notes | |
aux = str.split(raw_input()) | |
#remove the first item of a list which is the name of a studant | |
student_name = aux.pop(0) | |
#take the notes of a studant |
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
string_list = ["92", "27", "45", "23"] | |
print string_list | |
#["92", "27", "45", "23"] | |
print string_list[0] + string_list[1] | |
#9227 | |
integer_list = map(int, string_list) | |
print integer_list |
NewerOlder