Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alexander J. Rodriguez D. AlexR1712

🏠
Working from home
Block or report user

Report or block AlexR1712

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AlexR1712
AlexR1712 / checkSession.php
Last active May 28, 2019 — forked from TT44bb/checkSession.php
Check whether sessions work in php
View checkSession.php
<?php
error_reporting( E_ALL );
ini_set( 'display_errors', 1);
if(!isset($_GET['action'])){
die('Param is missing. Look at the <a href="https://gist.github.com/2995743">source</a>.');
}
switch($_GET['action']) {
@AlexR1712
AlexR1712 / !WhatsApp On Web Monitor.md
Last active Dec 13, 2018 — forked from parthpower/!WhatsApp On Web Monitor.md
Simple JS to monitor offline and online time of a contact.
View !WhatsApp On Web Monitor.md

WhatsApp On Web Monitor

What It does

It gives notifications when someone goes online or offline or typing. Open chat of the contact you want to monitor and start script.

Simple Way

@AlexR1712
AlexR1712 / activity.js
Last active Jun 2, 2018
Time Activity
View activity.js
// Script for track user activity in page and out the page
var timeActiveOnSite = 0; // seconds
var timeInactive = 0; // seconds
var lastActivityDatetime;
window.setInterval(function(){
if(document['visibilityState'] === 'visible'){
timeActiveOnSite++;
lastActivityDatetime = Date.now();
} else {
timeInactive++;
@AlexR1712
AlexR1712 / levenshtein.php
Created Mar 19, 2018
levenshtein. without native function
View levenshtein.php
<?php
// Distancia Levenshtein en PHP (Sin usar la funciona nativa)
function lev($s,$t) {
$m = strlen($s);
$n = strlen($t);
for($i=0;$i<=$m;$i++) $d[$i][0] = $i;
for($j=0;$j<=$n;$j++) $d[0][$j] = $j;
@AlexR1712
AlexR1712 / README.md
Created Feb 12, 2018
Sequelize + Express + Migrations + Seed Starter
View README.md
@AlexR1712
AlexR1712 / getElemClicked.js
Last active Jan 18, 2018
Get element clicked
View getElemClicked.js
document.addEventListener('click', function(e) {
e = e || window.event;
var target = e.target || e.srcElement,
text = target.textContent || text.innerText;
}, false);
// Version Two
if (document.addEventListener){
document.addEventListener("click", function(event){
var targetElement = event.target || event.srcElement;
@AlexR1712
AlexR1712 / printMousePos.js
Created Jan 18, 2018
print Mouse Position
View printMousePos.js
function printMousePos(event) {
document.body.textContent =
"clientX: " + event.clientX +
" - clientY: " + event.clientY;
}
document.addEventListener("click", printMousePos);
@AlexR1712
AlexR1712 / bancos
Created Dec 27, 2017 — forked from xombra/bancos
Codigo y Bancos correspondientes de Venezuela
View bancos
Banco:
<select name="banco">
<option value=""></option>
<option value="0156">100%BANCO</option>
<option value="0196">ABN AMRO BANK</option>
<option value="0172">BANCAMIGA BANCO MICROFINANCIERO, C.A.</option>
<option value="0171">BANCO ACTIVO BANCO COMERCIAL, C.A.</option>
<option value="0166">BANCO AGRICOLA</option>
<option value="0175">BANCO BICENTENARIO</option>
<option value="0128">BANCO CARONI, C.A. BANCO UNIVERSAL</option>
View .gitlab-ci.yml
stages:
- test
- build
- deploy
test:
stage: test
script: echo "Running tests"
build:
@AlexR1712
AlexR1712 / Enigma.php
Created Oct 26, 2017 — forked from Cloud5Ideas/Enigma.php
PHP Enigma Machine
View Enigma.php
<?php namespace App\Services;
/**
* A PHP version of the Enigma machine.
* Wikipedia: http://en.wikipedia.org/wiki/Enigma_machine
*
* This might not be an accurate representation. I have never seen, nor used an enigma machine.
* This class was created by reading the article at http://enigma.louisedade.co.uk/howitworks.html.
*
* Usage:
You can’t perform that action at this time.