Skip to content

Instantly share code, notes, and snippets.

View tiagovizoto's full-sized avatar
🎯
Focusing

Tiago Vizoto tiagovizoto

🎯
Focusing
  • Curitiba-PR, Brazil
View GitHub Profile
@tiagovizoto
tiagovizoto / crypt.py
Created March 11, 2016 16:43
cryptography AES in python
from Crypto.Hash import SHA512
from Crypto.Cipher import AES
class CryptKey():
def __init__(self, password):
self.password = password
cipher_text = ""
decryption_suite = ""
@tiagovizoto
tiagovizoto / fila_python.py
Created May 10, 2016 14:42
Fila - Estrutura de Dados em Python
class Fila:
def __init__(self):
self.fila = []
self.tamanho_fila = 0
def push(self, e):
self.fila.append(e)
self.tamanho_fila +=1
def pop(self):
class Deque:
def __init__(self):
self.len=0
self.deque = []
def empty(self):
if self.len == 0:
return True
return False
#!/bin/bash
read -p "Digite o caminho do arquivo: " CAMINHO
while [ 1 = 1 ]
do
DATA=$(date)
if [ "$(du -s $CAMINHO | cut -f1)" -ge 10000 ]
then
echo " $DATA O Diretorio $CAMINHO passou dos 10M">>/home/mago/trabalho.log
@tiagovizoto
tiagovizoto / 50_linhas.sh
Created June 22, 2016 20:00
50_linhas.sh
#!/bin/bash
read -p "Digite o caminho do arquivo: " CAMINHO
while [ 1 = 1 ]
do
DATA=$(date)
if [ "$(cat $CAMINHO | wc -l)" -ge 50 ]
then
echo " $DATA O Arquivo $CAMINHO passou de 50 linhas">>/home/mago/linhas.log
@tiagovizoto
tiagovizoto / mongodb_connection.py
Created October 26, 2016 20:28
Example MongoDB with Python
from pymongo import MongoClient
from time import strftime
#model for post
post = {
"title":"Title of Post",
"content":"Content of posts. Text, test. I need Work!!!",
"author":"Tiago Vizoto",
"date": strftime('%Y-%m-%D')
}
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<meta charset="utf-8">
<title id="app">{{nameApp}}</title>
</head>
<body>
<div id="alunosApp">
<form>
syntax enable
set number
set ts=4
set autoindent
set expandtab
@tiagovizoto
tiagovizoto / launcher.desktop
Created September 6, 2018 18:34
Create launcher on linux.
[Desktop Entry]
Type=Application
Exec=script.sh
Icon=icon.png
Name=Name Application
GenericName=Application
Categories=Categoria;
@tiagovizoto
tiagovizoto / launcher.desktop
Created September 6, 2018 18:34
Create launcher on linux. Dir /usr/share/applications
[Desktop Entry]
Type=Application
Exec=script.sh
Icon=icon.png
Name=Name Application
GenericName=Application
Categories=Categoria;