Skip to content

Instantly share code, notes, and snippets.

View WillCQ97's full-sized avatar
🐢
Devagar e Sempre...

Willian WillCQ97

🐢
Devagar e Sempre...
  • Ibatiba - ES, Brasil
View GitHub Profile
@WillCQ97
WillCQ97 / tamanho-do-banco.sql
Created May 6, 2024 11:56
Visualizar o tamanho de um banco postgres
SELECT
'TOTAL' AS banco,
sum(pg_database_size(datname)) AS tamanho,
pg_size_pretty(sum(pg_database_size(datname))) AS tamanho_bonito
FROM
pg_database
WHERE
datname NOT IN ('template0', 'template1', 'postgres')
@WillCQ97
WillCQ97 / eclipse-formatters--itix.xml
Created April 10, 2024 17:37
Formatter Configuration for Eclipse
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="23">
<profile kind="CodeFormatterProfile" name="Default-itix" version="23">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="separate_lines_if_wrapped"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
@WillCQ97
WillCQ97 / .pretierrc
Created August 18, 2022 10:50
My prettierrc configuration file.
{
"printWidth": 100,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "none",
"tabWidth": 2,
"semi": true
}
@WillCQ97
WillCQ97 / eclipse-DEFAULT_IDENTATION.xml
Last active October 2, 2023 00:59
My eclipse default identation file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="14">
<profile kind="CodeFormatterProfile" name="Default" version="14">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="separate_lines_if_wrapped"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
@WillCQ97
WillCQ97 / move-arquivos-aleatoriamente.sh
Created February 5, 2021 13:03
Move arquivos aleatóriamente para pastas numeradas, de acordo com o máximo de arquivos definidos para cada pasta.
#!/bin/bash
# Autor: willcq
# Cria diretórios e randomicamente move arquivos para ele.
CONT=0
VALOR=1
MAX_ARQ=20
ls | sort -R | while read -r file ; do
@WillCQ97
WillCQ97 / exibir-informações-sistema.sh
Created January 23, 2021 15:19
Script que exibe algumas informações do sistema.
# Autor desconhecido
#!/bin/bash
if test $# -ne 1;
then
echo "Comandos Disponíveis: cpu, mem ou disk"
echo use: $0 comando
exit 1
fi
#include <stdio.h>
#include <stdin.h>
int main(){
printf("Primeiro gist\n");
return 0;
}