Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
1. Install oh my zsh | |
http://ohmyz.sh/ | |
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
1. Install powerline fonts | |
https://github.com/powerline/fonts | |
1. download agnoster theme | |
https://github.com/mbadolato/iTerm2-Color-Schemes/zipball/master |
const functions = require('firebase-functions'); | |
const gcs = require('@google-cloud/storage')(); | |
const sharp = require('sharp') | |
const _ = require('lodash'); | |
const path = require('path'); | |
const os = require('os'); | |
exports.generateThumbnail = functions.storage.object('uploads/{imageId}').onChange(event => { | |
const object = event.data; // The Storage object. |
{... | |
"scripts": { | |
"postinstall": "node patch.js", | |
... | |
} | |
} |
//this.validIBAN('DE89 3704 0044 0532 0130 00'); | |
validIBAN(iban) { | |
// valid == 1 | |
// invalid != 1 | |
console.log(this.isValidIBANNumber(iban)); | |
} | |
isValidIBANNumber(input) { | |
let CODE_LENGTHS = { |
pragma solidity ^0.4.25; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; | |
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol"; | |
contract Games is usingOraclize, Ownable { | |
string private list; | |
mapping (bytes32 => bool) private pendingQueries; |
/** | |
@notice Generate random number from sig | |
@param _sigseed Sign hash for creation random number | |
@param _min Minimal random number | |
@param _max Maximal random number | |
@return random number | |
*/ | |
function generateRnd(bytes _sigseed, uint _min, uint _max) public pure returns(uint) { | |
require(_max < 2**128); | |
return uint256(keccak256(_sigseed)) % (_max.sub(_min).add(1)).add(_min); |
/** | |
@notice Generate random number from sig | |
@param _sigseed Sign hash for creation random number | |
@param _min Minimal random number | |
@param _max Maximal random number | |
@return random number | |
*/ | |
function generateRnd(bytes _sigseed, uint _min, uint _max) public pure returns(uint) { | |
require(_max < 2**128); | |
return uint256(keccak256(_sigseed)) % (_max.sub(_min).add(1)).add(_min); |
'use strict'; | |
const functions = require('firebase-functions'); | |
const sgMail = require('@sendgrid/mail'); | |
sgMail.setApiKey("SEND_GRID_API_KEY"); /** replace with your own SendGrid API key */ | |
const cors = require('cors')({ | |
origin: ['ANGULAR_DEVELOPMENT_ENVIRONMENT_URL'], /** replace with the url of your development environment that serves your angular app. */ |
var functions = require('firebase-functions'); | |
const sendgrid = require('sendgrid') | |
const client = sendgrid("YOUR_SG_API_KEY") | |
function parseBody(body) { | |
var helper = sendgrid.mail; | |
var fromEmail = new helper.Email(body.from); | |
var toEmail = new helper.Email(body.to); | |
var subject = body.subject; |