Note: This guide applies to the project created by quasar-cli.
First install typescript
and ts-loader
packages in your project.
npm i -D typescript ts-loader
Then modified the quasar.conf.js
file in your project:
Note: This guide applies to the project created by quasar-cli.
First install typescript
and ts-loader
packages in your project.
npm i -D typescript ts-loader
Then modified the quasar.conf.js
file in your project:
function formatTime (timeInMs) { | |
let date = new Date(timeInMs) | |
// ${date.getDate()}/${date.getMonth()}/${date.getFullYear()} | |
return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}.${date.getMilliseconds()}` | |
} | |
function log (type, ...args) { | |
if (this.$options.debug) { | |
console[type](`%c[${this.$_id}]${formatTime(Date.now())}>> `, | |
`background:${type === 'log' ? '#384A5E' : type === 'warn' ? '#F1BF39' : '#FF5370'}; padding: 3px; border-radius: 3px; color: #fff`, |
const prefix = process.env.PREFIX | |
const nodeEnv = process.env.NODE_ENV | |
let logCounter = 0 | |
let errorCounter = 0 | |
let fatalCounter = 0 | |
let warnCounter = 0 | |
export const vLogger = { | |
install (Vue, options) { |
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
<?php | |
# Include this file in your functions.php | |
add_shortcode('human-name', 'human_name'); | |
add_shortcode('human_name', 'human_name'); | |
add_shortcode('name', 'human_name'); | |
function human_name($atts, $content = null) { | |
return HumanName::parse($content); |
#!/bin/sh | |
# ---- Config | |
ENV_NAME="Homologação" | |
TAG_SUFFIX="homolog" | |
PROJECT_NAME="Scania Journey Event" | |
PROJECT_PATH_HOST="/home/lfalmeida/Projects/GitHooks/prod/" | |
PROJECT_PATH_DOCKER="/src/projeto" | |
SLACK_WEBHOOK="" | |
ENABLE_SLACK_POST=0 |
#!/usr/bin/env bash | |
V_DIR_SQL="/home/sysadmin/data" | |
V_DIR_BACKUP="/home/sysadmin/backup" | |
V_HOST="localhost" | |
V_DATABASE="database" | |
V_USER="root" | |
V_PASSWORD="root" |
<?php | |
final class DiggStylePagination { | |
/** | |
* DiggStylePagination::create(5, 1, 15, function($page){ return 'http://localhost/' . $page; }) | |
* | |
* | |
*/ | |
public final static function create($currentPage, $firstPage, $totalPages, \Closure $url, $adjacents = 1, array $classes = []) { |