I hereby claim:
- I am kuroisuna on github.
- I am axelgarcia (https://keybase.io/axelgarcia) on keybase.
- I have a public key ASB9DZfZjw-ddCNNr11GdHkg8Re87zPPaH9gqJ_aNd0dcQo
To claim this, I am signing this object:
<?php | |
/* Change to the correct path if you copy this example! */ | |
require __DIR__ . '/vendor/autoload.php'; | |
use Mike42\Escpos\Printer; | |
use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; | |
/** | |
* Install the printer using USB printing support, and the "Generic / Text Only" driver, | |
* then share it (you can use a firewall so that it can only be seen locally). | |
* |
I hereby claim:
To claim this, I am signing this object:
<?php | |
... | |
$rules = [ | |
'name' => 'required', | |
'age' => 'required|numeric|min:18', | |
'email' => 'email', | |
]; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> | |
<style id="jsbin-css"> |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Lighter.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Operator Mono", | |
"font_size": 15, | |
"ignored_packages": | |
[ |
<?php | |
if (!function_exists('post_to_put')) { | |
/** | |
* Turns POST/STORE rules to PUT/PATCH/UPDATE ones | |
* | |
* @param array $rules Validation rules array | |
* @param string $ignore Value to ignore | |
* @param string $additional Additional where clauses | |
* |
// Important to use dotenv (https://www.npmjs.com/package/dotenv) for security reasons | |
// every saved env variable is available inside "process.env" | |
require("dotenv").config(); | |
var redis = require("redis"); | |
var pushBullet = require("pushbullet"); | |
require("moment"); | |
var exec = require('child_process').exec; | |
var promise = require('promise'); | |
// Localized Date | |
var moment = require('moment-timezone'); |
// If we need the value of some form items | |
// Retrieve the form by its id | |
var formId = "users-form"; | |
var form = document.forms[formId]; | |
var userId = form.querySelector("[name=user-id]"); | |
var userName = form.querySelector("[name=user-name]"); | |
var userAge = form.querySelector("[name=user-age]"); | |
var userIdValue = userId.value; | |
// Example XHR with those values |
var helper = function (element) { | |
/** | |
* [private] Base HTML div | |
* @type {HTMLDivElement} | |
*/ | |
var element = element; | |
/** | |
* [public] Count of base element childrens | |
* @type {Number} |
-- Say we have this table called selected_colors: | |
-- +----------------+ | |
-- | type | value | | |
-- +--------+-------+ | |
-- | blue | 1 | | |
-- | red | 4 | | |
-- | yellow | 8 | | |
-- | red | 12 | | |
-- | blue | 5 | | |
-- | blue | 0 | |