git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
//Mime types. Some keys are duplicated. | |
array( | |
".3dm"=>"x-world/x-3dmf", | |
".3dmf"=>"x-world/x-3dmf", | |
".a"=>"application/octet-stream", | |
".aab"=>"application/x-authorware-bin", | |
".aam"=>"application/x-authorware-map", | |
".aas"=>"application/x-authorware-seg", | |
".abc"=>"text/vnd.abc", |
.table-responsive .fixed-column { | |
position: absolute; | |
display: inline-block; | |
width: auto; | |
border-right: 1px solid #ddd; | |
opacity: 0; | |
top: 0; | |
z-index: 3; | |
background: #fff; | |
color: #2d2d2d; |
<?php | |
// index.php | |
<?php | |
$aDados = ['item1' => 'value1', 'item2' => 'value2', 'dados' => ['a','b','c']]; | |
$username = 'user'; | |
$password = 'pass'; | |
$sUrl = 'http://localhost/projetos/estudos/php/curl/response.php/?item3=value3&item4=value4'; | |
$sHttpBuildQuery = http_build_query($aDados); | |
$ch = curl_init(); | |
curl_setopt( $ch, CURLOPT_URL, $sUrl ); |
function generateUrl() { | |
$protocol = $_SERVER['SERVER_PORT'] == '443' ? 'https' : 'http'; | |
$uri = $_SERVER['REQUEST_URI']; | |
$Url = $protocol.'://'.str_replace('//', '/', $_SERVER['SERVER_NAME'].'/'.$uri); | |
return $Url; | |
} |
function generateUrl() { | |
var location = window.location, | |
url = window.location.href; | |
if (location.protocol == 'https:') { | |
url = 'https:' + location.href.substring(location.protocol.length); | |
} | |
return url; | |
} | |
function hasClass(el, className) { |