Skip to content

Instantly share code, notes, and snippets.

View saulobr88's full-sized avatar

Saulo Gomes saulobr88

View GitHub Profile
@saulobr88
saulobr88 / restore-vscode.sh
Created January 24, 2025 03:45
Restore vscode extensions and settings in Ubuntu Linux
#!/bin/bash
# Author: saulo gomes - saulobr88@gmail.com
# Restore vscode extensions and settings in Ubuntu Linux
#
# file generated by command `code --list-extensions > vscode-extensions.txt`
extension_file="vscode-extensions.txt"
settings_file="settings.json"
version="1.0"
now=$(date '+%Y%m%d_%H%M%S')
@saulobr88
saulobr88 / docker-compose.yml
Last active January 17, 2022 21:57
Docker-Compose for PostgreSQL
version: '2'
services:
postgres:
image: postgres:13.4
container_name: postgres_for_my_app
restart: always
environment:
- POSTGRES_DB=my_database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
@saulobr88
saulobr88 / testPHPPDO.php
Created September 4, 2021 15:10
test PHP PDO
#!/usr/bin/php -q
<?php
echo ("===========================\n");
echo ("Teste de conexão usando o PHP-PDO\n");
echo ("===========================\n");
/* variaveis */
$host="localhost";
$dbname="dbname";
#!/bin/bash
############
# Ver.: 1.0 (Beta)
#
# Script que gerencia os Backups
# Serve para Criar, Restaurar e Deletar Backpups
#
# Basta definir os dados de origem, como diretórios e credênciais do Banco de Dados
# usage: ./bkptool.sh
#
#!/bin/bash
############
# Ver.: 1.0 (Beta)
#
# Script que mostra o uso do disco por mes
# Serve para sabermos o quanto é inserido ou removido
# entre os meses
#
# Basta definir o Workdir e executar
# usage: ./disk-usage-month-report.sh
#!/usr/bin/php
# Run from the PHP cli (Terminal)
# Ref.: https://clevertechie.com/php/97/web-scraping-php-parse-imdb.com-movies-html
<?php
function test()
{
$result = array();
for($i = 0; $i<3; $i++)
{