Skip to content

Instantly share code, notes, and snippets.

View jeffdrumgod's full-sized avatar

Jefferson Rafael Kozerski jeffdrumgod

View GitHub Profile
@jeffdrumgod
jeffdrumgod / http-benchmark.md
Created April 28, 2023 02:18 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@jeffdrumgod
jeffdrumgod / russia-ddos.md
Created March 2, 2022 21:44 — forked from sergeyzenchenko/russia-ddos.md
Russia DDOS list
$(document).ajaxStart(function () {
ShowBusy();
});
$(document).ajaxStop(function () {
HideBusy();
});
function ShowBusy() {
$('#ajaxBusy').hide();
@jeffdrumgod
jeffdrumgod / http_request.php
Created October 16, 2021 17:48 — forked from afair/http_request.php
PHP Function to make a remote HTTP request (POST, Authentication, API, Files, etc.) and returns the response
<?php
/**
* Makes a remote HTTP request and returns the response.
*
* @author Allen Fair <allen.fair@gmail.com>
* @copyright 2018 Allen Fair
* @license https://opensource.org/licenses/MIT MIT
*
* @param string $url The full URL endpoint: "https://example.com/endpoint"
* @param array $opt An Associative Array of extended request options
@jeffdrumgod
jeffdrumgod / vtexCustomIPSCookie.js
Last active July 20, 2021 13:44
Customize VTEX IPS cookie - forcing expiration time
(function vtexCustomIPSCookie() {
function createCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
} else {
var expires = "";
}
var domain = window.location.hostname;
@jeffdrumgod
jeffdrumgod / git-snippts.md
Last active July 13, 2021 10:01
Change git history
git filter-branch -f --commit-filter '
    if [ "$GIT_COMMITTER_NAME" = "Bruno Lollato" ];
    then
            GIT_COMMITTER_NAME="Jefferson Rafael Kozerski";
            GIT_AUTHOR_NAME="Jefferson Rafael Kozerski";
            GIT_COMMITTER_EMAIL="jefferson.rafael@infracommerce.com.br";
            GIT_AUTHOR_EMAIL="jefferson.rafael@infracommerce.com.br";
            git commit-tree "$@";
 else
@jeffdrumgod
jeffdrumgod / browserdetect.js
Last active July 12, 2021 14:18
browserdetect.js
window.BrowserDetect = {
init: function () {
try {
const browser = this.getNavigator();
this.browser = browser.name;
this.version = browser.version;
this.os = this.searchString(this.dataOS) || 'Unknown';
this.mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion);
document.body.classList.add('browser-' + this.browser.toLowerCase());
@jeffdrumgod
jeffdrumgod / events-jquery-dom-change-examples.js
Created February 22, 2021 18:01
events-jquery-dom-change-examples.js
$("#parent").on('DOMNodeInserted', function(e) {
console.log(e.target, ' was inserted');
});
$("#parent").on('DOMNodeRemoved', function(e) {
console.log(e.target, ' was removed');
})
$("#someDiv").bind("DOMSubtreeModified", function() {
alert("tree changed");
@jeffdrumgod
jeffdrumgod / modelo-html-bootstrap.html
Created December 1, 2020 19:07
modelo-html-bootstrap.html
<link rel="stylesheet" href="https://getbootstrap.com/docs/4.5/assets/css/docs.min.css">
<div class="container">
<main class="bd-content" role="main">
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<a class="btn btn-sm btn-bd-light my-2 my-md-0" title="" target="_blank" rel="noopener"></a>
<h1 class="bd-title" id="content">Dior - Digital Typography Guidelines</h1>
</div>
<h2 id="dior-headings"><span class="bd-content-title">Headings<a class="anchorjs-link " aria-label="Anchor"
@jeffdrumgod
jeffdrumgod / hash-change-class-body-vtex-checkout.js
Created October 20, 2020 19:15
hash-change-class-body-vtex-checkout.js
(function() {
var onhashChange = function() {
var step = window.location.hash.replace(/\W/g,'');
for(var item in document.body.classList) {
if ({}.hasOwnProperty.call(document.body.classList, item)) {
if (document.body.classList[item].indexOf('step-now-') === 0) {
document.body.classList.remove(document.body.classList[item]);
}
}
}