Skip to content

Instantly share code, notes, and snippets.

View felipevr's full-sized avatar

Felipe V. Rigo felipevr

View GitHub Profile
@felipevr
felipevr / docker-cheatseet-pt_br.md
Last active November 12, 2021 14:41
Docker cheatsheet - PT_BR

Comandos relacionados às informações:

  • docker version - exibe a versão do docker que está instalada.
  • docker inspect ID_container - retorna diversas informações sobre o contêiner.
  • docker ps - exibe todos os contêineres em execução no momento.
  • docker ps -a - exibe todos os contêineres, independentemente de estarem em execução ou não.

Comandos relacionados à execução:

  • docker run NOME_DA_IMAGEM - cria um contêiner com a respectiva imagem passada como parâmetro.
  • docker run -it NOME_DA_IMAGEM - conecta o terminal que estamos utilizando com o do contêiner.
  • docker run -d -P --name NOME dockersamples/static-site - ao executar, dá um nome ao contêiner.
@felipevr
felipevr / git_tips_n_tricks.md
Last active May 23, 2023 19:04
Git Tips n' Tricks

Remove local git tags that are no longer on the remote repository

From Git v1.7.8 to v1.8.5.6, you can use this:

git fetch <remote> --prune --tags

with all Git version since v1.7.8, you can use the following command:

git fetch --prune <remote> +refs/tags/*:refs/tags/*

@felipevr
felipevr / gitflow-breakdown.md
Last active March 28, 2022 12:05 — forked from ubante/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@felipevr
felipevr / curso_cakephp_ufms.sql
Last active September 18, 2017 02:36
Sample Database Schema
CREATE DATABASE IF NOT EXISTS `grade_disciplinar` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `grade_disciplinar`;
CREATE TABLE cursos (
id INT AUTO_INCREMENT PRIMARY KEY,
nome VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
created DATETIME NOT NULL ,
updated DATETIME NOT NULL
);
@felipevr
felipevr / install_composer.bat
Created September 18, 2017 02:09
Download and install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
@felipevr
felipevr / formulario.php
Created May 28, 2012 12:22
Sample html/php file
<html>
<head><title> Formulário</title></head>
<body>
<?php
if(isset($_POST['enviar'])) {
$nome=$_POST["txtNome"];
$tel=$_POST["txtTel"];
$email=$_POST["txtEmail"];