Skip to content

Instantly share code, notes, and snippets.

View clevertonh's full-sized avatar
🎯
Concentrando

Cléverton Heming clevertonh

🎯
Concentrando
View GitHub Profile
@clevertonh
clevertonh / bot-send-message.js
Created July 31, 2018 02:10 — forked from DevWellington/bot-send-message.js
bot web.whatsapp.com - send message for a contacts list
var script = document.createElement('script');
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
// search contact
function searchContact(searchValue, interval_add)
{
var interval = interval_add;
var count = 1;
@clevertonh
clevertonh / rewrite_CSP_header.js
Created July 26, 2018 19:49 — forked from wearhere/rewrite_CSP_header.js
How to rewrite the 'content-security-policy' HTTP header to work around bugs in the Chrome extension APIs: https://www.mixmax.com/blog/what-to-do-when-your-app-breaks
var hosts = 'https://d1j5o6e2vipffp.cloudfront.net';
var iframeHosts = 'https://app.mixmax.com';
chrome.webRequest.onHeadersReceived.addListener(function(details) {
for (var i = 0; i < details.responseHeaders.length; i++) {
var isCSPHeader = /content-security-policy/i.test(details.responseHeaders[i].name);
if (isCSPHeader) {
var csp = details.responseHeaders[i].value;
csp = csp.replace('script-src', 'script-src ' + hosts);
csp = csp.replace('style-src', 'style-src ' + hosts);
@clevertonh
clevertonh / listacontatowhatsappTI.txt
Created July 25, 2018 12:35 — forked from daciolima/listacontatowhatsappTI.txt
Lista de Contato Whatsapp - Tecnologia da Informação
Lista de grupos devs no Whatsapp
HTML DEV: https://chat.whatsapp.com/9gQI8IURE9UAL8oxL7sF3v
PHP DEV: https://chat.whatsapp.com/CmTibFkDRgs5UyUydfXX1Z
JAVA DEV: https://chat.whatsapp.com/IQ0n64JpftqGMJ2RIlJwrq
JAVASCRIPT DEV: https://chat.whatsapp.com/E2di9x9DrHt1yfn35CCsXn
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN
@clevertonh
clevertonh / index.php
Created June 17, 2015 20:45
Cria um ARRAY com todos os links que achar dentro do código HTML.
<?php
$lstLink = "";
$texto_html = '<html>
<head></head>
<body>
<a href="www.google.com">Link 1</a>
<a href="www.globo.com">Link 2</a>
<a href="www.facebook.com">Link 3</a>
@clevertonh
clevertonh / script.js
Created June 17, 2015 20:37
Quando usado o componente de ABA do Twitter Bootstrap junto com o CodeCharge Studio 4 ocorre conflito das LIBs de AJAX do CodeCharge. As ABAs são ocultadas após clicar sobre elas. Com o código abaixo se resolve esse problema.
jQuery.noConflict();
jQuery(function(){
jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function(e){
jQuery(e.relatedTarget).show();
});
});
@clevertonh
clevertonh / index.html
Last active August 29, 2015 14:23
Classe para não quebrar a linha em uma TABLE usando o Twitter Bootstrap, quando chega ao final da linha adiciona pontos.
<table class="table table-ellipsis">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>