Skip to content

Instantly share code, notes, and snippets.

View stefano-rs's full-sized avatar

Stefano stefano-rs

View GitHub Profile
function getTimeStringBrasilConvert(brDate){
return new Date(brDate.split('/').reverse().join("-"));
}
@stefano-rs
stefano-rs / datetime.php
Last active March 15, 2016 18:29
Gerando DateTime
<?php
$time_zone = new DateTimeZone('America/Sao_Paulo');
$now = new DateTime();
$now->setTimezone($time_zone);
echo $timestring = $now->format('Y-m-d H:i:s');
.vertical-alinhamento {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
/* Large desktops and laptops */
@media (min-width: 1200px) {
}
/* Landscape tablets and medium desktops */
@media (min-width: 992px) and (max-width: 1199px) {
}
<?php
preg_replace('/^([\d]{4})-([\d]{2})-([\d]{2})$/', '$3/$2/$1', $date);
<?php
preg_replace('/([\d]{3})([\d]{3})([\d]{3})([\d]{2})/', '$1.$2.$3-$4', $order_info['custom_field'][$this->config->get('pagseguro_cpf')]);
<?php
$ex = new stdClass;
if(property_exists($ex, "nome_propiedade")){
echo 'exite';
} else {
echo 'nao existe'
}
git blame arquivo.php -L 3400,3450
git log -S "texto para busca" arquivo.php
git log --graph
git log --author="Jon"
git log --after="2013-11-12 00:00" --before="2013-11-12 23:59
{
"files.eol": "\n",
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.renderWhitespace": "all",
"files.encoding": "utf8"
}