Skip to content

Instantly share code, notes, and snippets.

View progerio's full-sized avatar
😀

Paulo Rogério progerio

😀
View GitHub Profile
@progerio
progerio / install-noip2.sh
Created August 20, 2021 16:43
Script install no-ip2 ubuntu raspberry PI 3
#!/bin/bash
set -e
# Donwload no-ip2 software
donwload() {
cd /usr/local/src/
sudo wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
}
# Unzip tar
@progerio
progerio / sse.html
Created April 2, 2020 22:57
Example sse component
<html>
<head>
<meta charset="UTF-8">
<title>Server-sent events demo</title>
</head>
<body>
<button>Close the connection</button>
<ul>
</ul>
@progerio
progerio / checkAll.js
Created April 2, 2020 22:54
Jquery - check all input checkbox
function checkAll(){
$("#checkTodos").click(function(){
$('input:checkbox').not(this).prop('checked', this.checked);
});
}
document.ready(function(){
checkAll();
});
@progerio
progerio / external-login.php
Last active April 2, 2020 22:43
Login externo no joomla framework
<?php
define('_JEXEC', 1);
define('JPATH_BASE', '../');
define('DS', DIRECTORY_SEPARATOR);
require_once('../configuration.php');
require_once(JPATH_BASE . DS . 'includes' . DS . 'defines.php');
require_once(JPATH_BASE . DS . 'includes' . DS . 'framework.php');
$mainframe = JFactory::getApplication('site');
$mainframe->initialise();
@progerio
progerio / sql-php-array.js
Last active May 25, 2021 17:40
Extractor database SQL-php-array- PHPSTORM
function eachWithIdx(iterable, f) {
var i = iterable.iterator();
var idx = 0;
while (i.hasNext()) f(i.next(), idx++);
}
function repeatStringNumTimes(string, times) {
var repeatedString = "";
while (times > 0) {