This file contains hidden or 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
<template> | |
<div class="card"> | |
<component v-bind:is="componentFile"></component> | |
</div> | |
</template> | |
<script> | |
export default{ | |
props: { | |
componentName: { | |
type: String, |
This file contains hidden or 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 verifyVkn(vkn) { | |
if (typeof vkn !== 'string') throw new TypeError('vkn should be a string'); | |
if (vkn.length !== 10) throw new TypeError('invalid length'); | |
const digits = vkn.split(''); | |
const control = digits.pop(); // eslint-disable-line | |
const r = []; | |
digits.forEach((el, i) => { |
This file contains hidden or 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 objectifyByKey(arr, key) { | |
if (!Array.isArray(arr)) throw new Error('not an array'); | |
if (!arr.length) return; | |
const reducer = (acc, el) => { | |
if (Object.prototype.hasOwnProperty.call(key, el)) { | |
return { ...acc, [el[key]]: el }; | |
} | |
return {}; | |
}; |
This file contains hidden or 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 tau, | |
denom; | |
tau = (Math.sqrt(5)-1)/2; | |
denom = 1 - Math.pow(tau, 3); | |
var V = [], i=0; | |
var B = 15 * Math.sqrt(8); // test for 8 Boards |
This file contains hidden or 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
# Edit this file to introduce tasks to be run by cron. | |
# | |
# Each task to run has to be defined through a single line | |
# indicating with different fields when the task will be run | |
# and what command to run for the task | |
# | |
# To define the time you can provide concrete values for | |
# minute (m), hour (h), day of month (dom), month (mon), | |
# and day of week (dow) or use '*' in these fields (for 'any').# | |
# Notice that tasks will be started based on the cron's system |
This file contains hidden or 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
<script> | |
var luhnNo = '79927398711'; | |
function luhn(num){ | |
var numArr = num.split(''), | |
tempInt, | |
odd = 0, | |
even = 0; | |
numArr.reverse(); |
This file contains hidden or 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
/** | |
* Valid Luhn Number Checker | |
*/ | |
class Luhn | |
{ | |
static public function valid($num) | |
{ | |
$odd = 0; |
This file contains hidden or 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
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |