Skip to content

Instantly share code, notes, and snippets.

const restify = require('restify');
const events = require('events');
const server = restify.createServer();
const eventEmitter = new events.EventEmitter();
const fs = require('fs');
const path = require('path');
const corsMiddleware = require('restify-cors-middleware');
const nfcCard = require('./lib/nfccard-tool');
const { NFC, TAG_ISO_14443_3, TAG_ISO_14443_4, KEY_TYPE_A, KEY_TYPE_B } = require('nfc-pcsc');
@neilodiaz
neilodiaz / lumen.log
Created June 26, 2020 11:37
Fast Fuel Transaction Logs
[2020-06-26 09:25:33] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accumulated Points: 2.35 - Write Points: 66.14 - Write Amount: 0
[2020-06-26 09:26:00] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accumulated Points: 2.35 - Write Points: 68.49 - Write Amount: 0
[2020-06-26 09:26:21] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accumulated Points: 0.47 - Write Points: 68.96 - Write Amount: 0
[2020-06-26 09:26:50] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accumulated Points: 0.47 - Write Points: 69.42999999999999 - Write Amount: 0
[2020-06-26 09:27:45] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accumulated Points: 0.24 - Write Points: 69.67 - Write Amount: 0
[2020-06-26 09:27:59] lumen.INFO: Customer: NDwR7sVhH4JTFaR9CNI37svDY5RL9T - Transaction: Normal Points Entry - Accum
@neilodiaz
neilodiaz / PayrollHelpers.php
Last active April 7, 2017 07:13
Snippet on how to get WTAX in the Philippines.
<?php
public function getWitholdingTax()
{
// Check if within minimum wage salary, then 0 tax
// Check from general settings
$general_settings = Settings::first();
if ($this->getBasicPay() <= $general_settings->minimum_pay)
return 0;
@neilodiaz
neilodiaz / vue-multiple-components.html
Last active August 6, 2020 14:07
VueJS 2.0 Multiple Components - To-Do app
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Multiple Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<link rel="stylesheet" type="text/css" href="">