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
# Author: Jean Jacques Barros | |
# Github: https://github.com/jjeanjacques10 | |
from time import sleep | |
import requests | |
from win10toast import ToastNotifier | |
LAST_READ = "" |
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
# Database URL | |
spring.datasource.url=jdbc:mysql://localhost:3306/shinobiDatabase | |
# Database User and Password | |
spring.datasource.username=root | |
spring.datasource.password=hokage | |
# Driver -> MySQL | |
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver | |
# Show SQL in terminal | |
spring.jpa.show-sql=true | |
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> |
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 requests | |
import os | |
from bs4 import BeautifulSoup | |
def get_manga_chapter(manga_name, num_chapters): | |
''' | |
Get the chapter images of manga {manga_name} from the website muitomanga.com | |
''' | |
for chapter in range(1, num_chapters): |
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
echo " | SERVER CONFIG SCRIPT |" | |
echo "Install GIT" | |
sudo apt-get install git | |
sudo apt-get install build-essential | |
sudo apt-get install curl openssl libssl-dev | |
echo "======= Install NVM =======" | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
echo "======= Install NodeJS version 14.16.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
import axios from 'axios'; | |
import NodeCache from 'node-cache'; | |
import querystring from 'qs'; | |
const accessTokenCache = new NodeCache({ deleteOnExpire: true }); | |
class AuthService { | |
constructor() { | |
this.CLIENT_ID = process.env.CLIENT_ID |
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 requests | |
HUBSPOT_API_KEY = '<HUBSPOT_API_KEY>' | |
def post_contact(data): | |
url = 'https://api.hubapi.com/crm/v3/objects/contacts?hapikey=' + HUBSPOT_API_KEY | |
headers = { | |
'Content-Type': 'application/json' | |
} | |
response = requests.post(url, json=data, headers=headers) |
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
async function getNews() { | |
const doc = new GoogleSpreadsheet('<YOUR-SPREADSHEET-ID>') | |
await doc.useServiceAccountAuth(creds); | |
await doc.loadInfo(); | |
const sheet = doc.sheetsByIndex[0]; | |
const rows = await sheet.getRows(); | |
// Get last news | |
return cleanText(rows[(rows.length - 1)].Message); | |
} |
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 flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/<nome>") | |
def hello(nome): | |
text = "<h1>Microsoft Student Partners</h1>" | |
text += "<h3>Hello, {}!</h3> <br>".format(nome) | |
text += "<img src='https://secure.meetupstatic.com/photos/event/b/b/2/a/global_481787914.jpeg'><br><br>" | |
text += "<i>by Jean J. Barros</i>" |
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
click==6.7 | |
Flask==1.0.2 | |
itsdangerous==0.24 | |
Jinja2==2.10 | |
MarkupSafe==1.0 | |
Werkzeug==0.14.1 |