Skip to content

Instantly share code, notes, and snippets.

View juniorcesarabreu's full-sized avatar
🏠
Working from home

Júnior César Abreu juniorcesarabreu

🏠
Working from home
View GitHub Profile
blockquote {
color: #444;
font-style: italic;
}
blockquote::before, blockquote::after {
color: #000;
font-size: 3em;
}
blockquote::before {
@juniorcesarabreu
juniorcesarabreu / @media print.css
Created April 12, 2017 17:24
Os navegadores nos permitem adicionar estilos especí�cos para quando uma página for impressa pelo usuário. Isto pode ser feito de duas maneiras: Com o atributo media na tag link ou criando um bloco de CSS dentro da diretiva @media print
/* O atributo "media" indica que estes estilos
só devem ser aplicado para impressões */
<link href="print.css" media="print">
/* OU */
@media print {
/* Este CSS só será aplicado quando a página for impressa */
* {
background: transparent !important ;
@juniorcesarabreu
juniorcesarabreu / @font-face .css
Last active April 12, 2017 17:29
Permite definir novas famílias de fontes
@font-face {
font-family: "Lobster";
font-style: normal;
font-weight: 400;
/* a propriedade src é responsável por definir a localização da fonte:
a função local informa um possível nome para a fonte que será pesquisado
na máquina do usuário, ou uma URL externa para que a fonte seja baixada
como um recurso adicional, igual a uma imagem de fundo, por exemplo. */
src: local('Lobster'), url(/fonts/lobster.woff) format('woff');
}
<h3 class='tnt'>TNT</h3>
.tnt {
  border-radius: 50%;
  border: 5px solid #000;
  height: 50px;
 line-height: 50px;
@juniorcesarabreu
juniorcesarabreu / Upload images to a gist.md
Last active November 22, 2023 15:09
How do you upload images to a gist?

How do you upload images to a gist?

  1. Create a gist or reuse one of your gists.
  2. Clone your gist:
git clone https://gist.github.com/<hash>.git
  1. Add your image to your gist's repository:
#include <iostream>
#include <chrono>
#include <ctime>
 
long fibonacci(unsigned n)
{
    if (n < 2) return n;
    return fibonacci(n-1) + fibonacci(n-2);
}
@juniorcesarabreu
juniorcesarabreu / index.html
Created April 13, 2017 18:05
Outline property
<p><b>Note:</b> IE8 supports the outline properties only if a !DOCTYPE is
specified.</p>
@juniorcesarabreu
juniorcesarabreu / memset.md
Last active November 17, 2023 12:05
A função memset(str, c, n) copia o caracter c (um unsigned char) para os n primeiros caracteres da string apontada por str.

Exemplo

#include <stdio.h>
#include <string.h>

int main ()
{
   char str[50];

 strcpy(str,"This is string.h library function");

In MySQL, there is no need to give a symbolic name to foreign key constraints. If a name is not given, InnoDB creates a unique name automatically.

fk_[referencing table name]_[referenced table name]

Example:

CREATE TABLE users(
 user_id int,
@juniorcesarabreu
juniorcesarabreu / utilDateToSQLDate.java
Last active May 4, 2017 13:05
Date conversion from java.util to java.sql
// Java Date
java.util.Date utilDate = new java.util.Date();
// SQL Date
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
// http://www.guj.com.br/t/converter-java-util-date-para-java-sql-date/29205/2