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 / script_geracao_estrutura_basica.bash
Created July 24, 2023 18:09
Geração de estrutura para uso interno
#!/bin/bash
pasta_raiz=$(basename "$(pwd)")
echo "Pasta raiz: $pasta_raiz"
echo "Selecione a pasta atual (pasta dentro de $pasta_raiz):"
select pasta_atual in */; do
pasta_atual=${pasta_atual%/} # Remove a barra do final
break
done
@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;
@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;
syntax enable
set number
set ts=4
set autoindent
set expandtab
<!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>
@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')
}
@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
#!/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
class Deque:
def __init__(self):
self.len=0
self.deque = []
def empty(self):
if self.len == 0:
return True
return False
@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):