Skip to content

Instantly share code, notes, and snippets.

View devgiordane's full-sized avatar
🏠
Working from home

Giordane Oliveira devgiordane

🏠
Working from home
View GitHub Profile
@devgiordane
devgiordane / webbrowser.py
Created September 25, 2018 00:13
Abra uma url no navegador usando Python.
import webbrowser
webbrowser.open("https://devgiordane.com")
@devgiordane
devgiordane / webserver.py
Created September 28, 2018 18:09
creates a simple web server using the standard python http.server library.
import http.server
import socketserver
PORTA = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORTA), Handler) as httpd:
print(f"servindo na porta {PORTA}")
httpd.serve_forever()
@devgiordane
devgiordane / Unicode_Alphabet.py
Last active October 4, 2018 01:00
Generate a list with the alphabet using the Unicode.
alfabeto =[]
for letra in range(97, 123):
alfabeto.append(chr(letra))
print(alfabeto)
@devgiordane
devgiordane / All_Unicode.py
Created October 4, 2018 01:02
Generates a file to save all Unicode characters and codes. the generated file has a further 14 Mb and the list will have 1,114,111 items.
characters = []
for character in range(0, 1114111):
characters.append(chr(character))
f = open('unicode.txt','w')
f.write(str(characters))
f.close()
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@devgiordane
devgiordane / JSON_TABELA_BRASILEIRAO_2018.json
Created February 5, 2019 01:15
Json de exemplo da primeira aula de VUE JS
[
{
"nome":"Palmeiras",
"silga":"PAL",
"pontos":"80",
"jogos":"38",
"vitorias":"23",
"empates":"11",
"derrotas":"4",
"gols_pro":"64",
<!DOCTYPE html>
<html lang="pt-br">
<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>CSS load API</title>
<style>
body {
app.get('/l/:url', async function (req, res) {
try {
await getInfo(req.params.url) // não tem haver com 301
await sendClick(req.params.url) // não tem haver com 301
await res.status(301).redirect(linkredir)
} catch (error) {
// Passes errors into the error handler
return next(error)
}
});
@devgiordane
devgiordane / formulario_chat.js
Created May 23, 2020 17:57
formulario_chat.js
var nome = document.getElementsByClassName("field-nome");
var operounabolsa = document.getElementsByClassName("field-operounabolsa");
var email = document.getElementsByClassName("field-email");
var sonho = document.getElementsByClassName("field-sonho");
var telefone = document.getElementsByClassName("field-telefone");
var botao = document.getElementsByClassName("fl-optin-button");
operounabolsa[0].style.display = "none";
email[0].style.display = "none";
sonho[0].style.display = "none";
<!-- item will be appened to this layout -->
<div id="log" class="sl__chat__layout">
</div>
<!-- chat item -->
<script type="text/template" id="chatlist_item">
<div data-from="{from}" data-id="{messageId}">
<span class="meta" style="color: {color}">
<span class="badges">
</span>