Skip to content

Instantly share code, notes, and snippets.

View jonathands's full-sized avatar
🏠
Working from home

Jonathan DS jonathands

🏠
Working from home
View GitHub Profile
@jonathands
jonathands / gist:bbe005e06909196677f11591c6272476
Created October 27, 2017 17:31
Remove Adblock wall das paginas do grupo abril
$('.tp-modal').hide();
$('.tp-modal-open').css("overflow","auto");
$('.tp-backdrop').hide();
@jonathands
jonathands / modelo.html
Last active September 16, 2021 12:11
Modelo de estante com leitor em JSON
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Informativo Online: NOME DO SEU ESCRITÓRIO</title>
<base target="_self">
<meta name="google" value="notranslate">
<iframe id="estanteiframe" height="850" style="width: 100%; margin: 0; padding: 0" frameborder="0" src=""> </iframe>
<script type="text/javascript">
let req = new XMLHttpRequest();
let publicServiceKey = 'CODIGODESUAESTANTE';
req.open('GET', 'https://www.businessinformativos.com.br/Services/Informativos/json?auth=' + publicServiceKey, true);
req.onload = function () {
if (req.status >= 200 && req.status < 400) {
let jsonRev = JSON.parse(req.responseText);
@jonathands
jonathands / multilinkloader
Created September 1, 2019 18:23
Concatenating several Links for printing
let tipUrlList = Array();
let index = 0;
let htmlContent;
document.querySelectorAll("pre a").forEach(function(e){
tipUrlList.push(e.href);
});
function loadPage(){
https://stackoverflow.com/questions?sort=BountyEndingSoon&filters=NoAnswers,NoAcceptedAnswer,Bounty&edited=true
@jonathands
jonathands / firebird-version.sql
Created February 14, 2020 18:28
Get the firebird version from a query
/* TAKEN FROM http://www.firebirdfaq.org/faq223/ */
SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION')
from rdb$database;
<div id="conteudo_semanal" class="conteudo_semanal">
<?php
//COLE O ENDEREÇO DO RSS DE SEU INFORMATIVO ABAIXO, AS ENTRE ASPAS DUPLAS
$endereco_do_rss = "*SUBSTITUA PELO ENDEREÇO RSS EM SUA ÁREA RESTRITA";
echo "<!-- $endereco_do_rss -->";
$invalidurl = false;
if(@simplexml_load_file($endereco_do_rss)){
$feeds = simplexml_load_file($endereco_do_rss);
}else{
@jonathands
jonathands / grabemailsfromfiles.py
Created May 14, 2020 00:40
trying to extract emails on
import os, re, sys
emails = []
current_file = ""
try:
files = os.listdir("msgs")
for f in files:
current_file = f
@jonathands
jonathands / vhost.sh
Created May 28, 2020 21:46 — forked from Adamwaheed/vhost.sh
Simple Apache Vhost manager
#!/bin/bash
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
@jonathands
jonathands / install.sh
Last active May 29, 2020 17:27
amazon php ec2
sudo amazon-linux-extras install epel -y
sudo yum install epel-release -y
sudo yum update -y
sudo amazon-linux-extras install "php7.4" -y
sudo yum install -y httpd php7.4 php-pgsql php-pdo_pgsql php-gd php-intl php-mbstring php-json git awscli certbot certbot-apache
#open ports
aws ec2 authorize-security-group-ingress --group-id sg-XXXXXXXXXXXXXXXXX --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id sg-XXXXXXXXXXXXXXXXX --protocol tcp --port 443 --cidr 0.0.0.0/0