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
-- create a million random numbers and strings | |
CREATE TABLE items AS | |
SELECT | |
(random()*1000000)::integer AS n, | |
md5(random()::text) AS s |
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
# | |
# Ubuntu Node.js Git Dockerfile | |
# | |
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile | |
# https://docs.docker.com/examples/nodejs_web_app/ | |
# | |
# Pull base image. | |
FROM ubuntu |
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
/** | |
* Vue component with Vuetify | |
* Read recursively all files and folders inside a choosen directory | |
*/ | |
<template> | |
<v-card class="pa-4" outlined> | |
<div class="d-flex"> | |
<v-btn | |
depressed | |
:color="isTreeEmpty ? 'default' : 'primary'" |
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
# | |
# Ubuntu Node.js Git Dockerfile | |
# | |
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile | |
# https://docs.docker.com/examples/nodejs_web_app/ | |
# | |
# Pull base image. | |
FROM ubuntu |
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
{ | |
"name": "functions", | |
"scripts": { | |
"lint": "tslint --project tsconfig.json", | |
"build": "tsc", | |
"build-watch": "tsc -w", | |
"serve": "concurrently \"firebase serve --only functions\" \"npm run build-watch\"", | |
"shell": "npm run build && firebase functions:shell", | |
"start": "npm run shell", | |
"deploy": "firebase deploy --only functions", |
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
import React, {Component, PropTypes} from 'react'; | |
import {intlShape} from 'react-intl'; | |
import {injectIntl} from './decorator'; | |
@injectIntl() | |
class Xpto extends Component { | |
static propTypes = { | |
intl: intlShape.isRequired | |
}; |
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
//Created by Carlos (Coders.me) | |
//http://www.coders.me/web-html-js-css/javascript/libreria-de-validaciones-simples | |
function _IsInteger(str) { if (typeof(str)=='undefined') { return false; } var expr = /^[+-]?[0-9]*$/; if (!expr.test(str)) return false; return true; } | |
function _IsNumber(str) { if (typeof(str)=='undefined') { return false; } var expr1 = /^[+-]?[0-9]+(.[0-9]{0,})?$/; var expr2 = /^[+-]?(.[0-9]{0,})?$/; if (!expr1.test(str)){ if (!expr2.test(str)){ return false; } } return true; } | |
function _IsMoney(str) { if (typeof(str)=='undefined') { return false; } var expr1 = /(?!^0*$)(?!^0*.0*$)^d{1,10}(.d{1,2})?$/; if (!expr1.test(str)){ return false; } return true; } | |
function _ValInMinMax(value,min,max) { if (!(_IsNumber(value))) { return false; } if ((!(_IsNumber(min))) || (!(_IsNumber(max)))) { return false; } if ((typeof(min)!='undefined') || (typeof(max)!='undefined')) { if ((typeof(min)!='undefined') && (typeof(max)!='undefined')) { if ((!isNaN(min)) && (!isNaN(max))) if (min>max) return false; } |