Skip to content

Instantly share code, notes, and snippets.

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

Alexander J. Rodriguez D. AlexR1712

🏠
Working from home
View GitHub Profile
@AlexR1712
AlexR1712 / README.md
Created February 12, 2018 20:44
Sequelize + Express + Migrations + Seed Starter
@AlexR1712
AlexR1712 / getElemClicked.js
Last active January 18, 2018 14:34
Get element clicked
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 January 18, 2018 14:27
print Mouse Position
function printMousePos(event) {
document.body.textContent =
"clientX: " + event.clientX +
" - clientY: " + event.clientY;
}
document.addEventListener("click", printMousePos);
@AlexR1712
AlexR1712 / bancos
Created December 27, 2017 20:17 — forked from xombra/bancos
Codigo y Bancos correspondientes de Venezuela
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>
stages:
- test
- build
- deploy
test:
stage: test
script: echo "Running tests"
build:
@AlexR1712
AlexR1712 / Enigma.php
Created October 26, 2017 01:48
PHP Enigma Machine
<?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:
@AlexR1712
AlexR1712 / image.php
Created October 23, 2017 14:03
gaussian blur in one sector of the image PHP
<?php
$loadFile = 'https://c1.staticflickr.com/5/4094/4809804115_40f52c8f25_b.jpg';
$image = imagecreatefromstring(file_get_contents($loadFile));
if ($image !== false) {
$face = imagecrop($image, ['x' => 152, 'y' => 568, 'width' => 199, 'height' => 199]);
@AlexR1712
AlexR1712 / 0x00000.bin
Created October 12, 2017 19:21 — forked from ajfisher/0x00000.bin
ESP8266 Transparent bridge to J5
@AlexR1712
AlexR1712 / tumblr.js
Created October 7, 2017 18:47
Tumblr Post type Text, thumbnails
/* Created by AlexR1712 */
function getImg (str) {
var m,
urls = [],
rex = /<img[^>]+src="(http:\/\/[^">]+)"/g;
while ( m = rex.exec( str ) ) {
urls.push( m[1] );
}
return urls;
}
@AlexR1712
AlexR1712 / developtome.js
Created October 7, 2017 13:48
developtome.js
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=0)}({"/6JT":function(t,e,n){t.exports=n.p+"assets/images/profil-03.jpg"},0:function(t,e,n){t.exports=n("JkW7")},"1/9l":function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tooltip"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.tooltip",o=new n(this,r)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.7"