Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Júnior César Abreu juniorcesarabreu

🏠
Working from home
View GitHub Profile
@juniorcesarabreu
juniorcesarabreu / pegar_ip.php
Last active Apr 12, 2017
pega o ip da requisição usando a variável global $_SERVER
View pegar_ip.php
// pega o ip da requisição usando a variável global $_SERVER
<?= $_SERVER['REMOTE_ADDR'];
@juniorcesarabreu
juniorcesarabreu / 0_reuse_code.js
Created Mar 25, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View keybase.md

Keybase proof

I hereby claim:

  • I am juniorcesarabreu on github.
  • I am juniorcesarabreu (https://keybase.io/juniorcesarabreu) on keybase.
  • I have a public key whose fingerprint is A93B E9E2 D9F3 C43C F9BD A786 A743 3CF0 ECCF 82E7

To claim this, I am signing this object:

View before-after.css
section {
border: 1px solid #000;
height: 100px;
margin: 40px auto;
width: 400px;
}
h1 {
background-color: #990000;
color: #FFF;
font-size: 1.2em;
@juniorcesarabreu
juniorcesarabreu / links.css
Created Apr 10, 2017
Estilização de cores de links em CSS
View links.css
View colortext.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View box-sizing.css
* {
/* Força o navegador a respeitar o limite do elemento
e a ocupar o espaço interno com os valores de padding
e border, em vez de expandir o elemento */
box-sizing: border-box;
}
@juniorcesarabreu
juniorcesarabreu / caixa-mensagem-seta.html
Last active Apr 13, 2017
Adição de uma seta usando ::before em uma mensagem
View caixa-mensagem-seta.html
<p class='help'>
Preencha o campo com um e-mail válido, assim poderemos entrar em
contato com você para informar o resultado do nosso concurso.
</p>
@juniorcesarabreu
juniorcesarabreu / criando-conteudo-atraves-de-CSS.css
Created Apr 11, 2017
Adiciona um símbolo Unicode atravpés da propriedade content no ::before
View criando-conteudo-atraves-de-CSS.css
.tip::before {
content: "\261E";
margin-right: 10px;
}
@juniorcesarabreu
juniorcesarabreu / timestamp.cpp
Created Apr 12, 2017
How to get current timestamp in milliseconds since 1970
View timestamp.cpp
#include <chrono>
// http://stackoverflow.com/questions/19555121/how-to-get-current-timestamp-in-milliseconds-since-1970-just-the-way-java-gets
// If you have access to the C++ 11 libraries, check out the std::chrono library.
// You can use it to get the milliseconds since the Unix Epoch like this:
using namespace std::chrono;
milliseconds ms = duration_cast< milliseconds >(
system_clock::now().time_since_epoch()