This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IBAN { | |
static code_lengths = { | |
AD: 24, AE: 23, AT: 20, AZ: 28, BA: 20, BE: 16, BG: 22, BH: 22, BR: 29, CH: 21, | |
CR: 21, CY: 28, CZ: 24, DE: 22, DK: 18, DO: 28, EE: 20, ES: 24, FI: 18, FO: 18, | |
FR: 27, GB: 22, GI: 23, GL: 18, GR: 27, GT: 28, HR: 21, HU: 28, IE: 22, IL: 23, | |
IS: 26, IT: 27, JO: 30, KW: 30, KZ: 20, LB: 28, LI: 21, LT: 20, LU: 20, LV: 21, | |
MC: 27, MD: 24, ME: 22, MK: 19, MR: 27, MT: 31, MU: 30, NL: 18, NO: 15, PK: 24, | |
PL: 28, PS: 29, PT: 25, QA: 29, RO: 24, RS: 22, SA: 24, SE: 24, SI: 19, SK: 24, | |
SM: 27, TN: 24, TR: 26, AL: 28, BY: 28, CR: 22, EG: 29, GE: 22, IQ: 23, LC: 32, | |
SC: 31, ST: 25, SV: 28, TL: 23, UA: 29, VA: 22, VG: 24, XK: 20, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// methods ending in 1 are inherited from Base | |
// methods ending in 2 are overriden in Child | |
class Base { | |
static num = 123; | |
static str = "asdf"; | |
fnInstanceThis1() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const REGEX_NON_ASCII_CHARS = /[\u00A0-\u9999]/g; | |
const REGEX_SPECIAL_CHARS = /[<>"'`&?=\\/()\[\]\{\}\#]/g; | |
let replaceCharWithHtmlEntity = char => `&#${char.charCodeAt(0)};`; | |
let htmlEncode = str => str.replace(REGEX_NON_ASCII_CHARS, replaceCharWithHtmlEntity) | |
.replace(REGEX_SPECIAL_CHARS, replaceCharWithHtmlEntity); | |
let urlEncode = str => encodeURIComponent(str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -u | |
############################################################################## | |
# DEPRECATION NOTE | |
# | |
# This script is outdated. Use it at your own risk. | |
# There is a new github repo with a new version, with no known bugs | |
# and with improved features: | |
# https://github.com/jotaelesalinas/ec2remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -u | |
############################################################################## | |
# DEPRECATION NOTE | |
# | |
# This script is outdated. Use it at your own risk. | |
# First, it has a bug related to the option -o (basically, it does nothing). | |
# Second, there is a new github repo with a new version, with no known bugs | |
# and with improved features: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Run this artisan command before: | |
* php artisan make:command MakeConfig | |
*/ | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Geoloc</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Configures an element to receive files via drag'n'drop. | |
* - el: drop element, either id string or HTMLElement object. | |
* - cb_ok: callback, accepts: contents or data returned by preprocessor, file and index; called once per successfully preprocessed file. | |
* - cb_fail: callback, accepts error, file and index; called once per failed file. | |
* - preprocessor: function that accepts the contents of the file and can return any data; accepts: contents, file, index; called once per dropped file. | |
* - cb_start: callback, called before preprocessing all files, accepts the files, can throw, e.g. if wrong filetypes | |
* - cb_finished: callback, called after handling all files, no matter is failed or not | |
* - css: CSS styles to be applied to the drop element | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var self = this; | |
self.version = '1.2'; | |
self.els = {}; | |
self.utils = {}; | |
self.utils.addEvent = function (el, evname, f, capture) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.highlight { | |
background-image: linear-gradient(-100deg,hsla(90,92%,75%,.3),hsla(90,92%,75%,.7) 98%,hsla(90,92%,75%,.1)); | |
border-radius: .25em 0; | |
padding: 0 .25em; | |
margin: 0 -.25em; | |
} | |
.underline { | |
background-image: linear-gradient(120deg, darkorange 0%, orange 100%); | |
background-repeat: no-repeat; | |
background-size: 100% 0.2em; |
NewerOlder