-
npm install mocha chai ts-node typescript @types/mocha @types/chai --save-dev -
Edit your
package.jsonto include:scripts: { "test": "node --harmony node_modules/mocha/bin/mocha --harmony -r ts-node/register *.spec.ts" }
| // main.js | |
| const nodemailer = require('nodemailer'); | |
| // setup mail transporter service | |
| const transporter = nodemailer.createTransport({ | |
| service: 'hotmail', | |
| auth: { | |
| user: '[email protected]', // your email | |
| pass: 'password' // your password | |
| } |
| # Update Jan 2024 | |
| # Deploying Cloud Functions is much simpler than it was 6 years ago. | |
| # I'm leaving the gist in it's original 2018 state for now, | |
| # but skip the the recent comments below for a simpler solution. | |
| variables: | |
| GCP_ZONE: us-central1-a | |
| stages: | |
| - npm-install |
| ## | |
| ## How to install mcrypt in php7.2 / php7.3 | |
| ## Linux / MacOS / OSX | |
| ## | |
| ## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
| # |
| var request = require('request'); | |
| var express = require('express'); | |
| var app = express(); | |
| app.get('/goofy', function(req, res) { | |
| request('http://images1.wikia.nocookie.net/__cb20120715102950/disney/images/a/a5/Disneygoofy2012.jpeg').pipe(res); | |
| }); | |
| app.get('/loop', function(req, res) { | |
| res.render('mypage'); |
| // Copyright (c) 2017, Ben Noordhuis <[email protected]> | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software for any | |
| // purpose with or without fee is hereby granted, provided that the above | |
| // copyright notice and this permission notice appear in all copies. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| import time | |
| import random | |
| # asks for the sign from user | |
| print("Which sign do you want to have ? x or o") | |
| ask_sign = input() | |
| # introduction | |
| print("""|------|------|------| | |
| | 1 | 2 | 3 | | |
| |------|------|------| |
| Introduction | |
| For an introduction to Git and how to install, please refer to the introduction tutorial. | |
| This article will teach you how to use Git when you want to deploy your application. While there are many ways to use Git to deploy our application, this tutorial will focus on the one that is most straightforward. I assume you already know how to create and use a repository on your local machine. If not, please refer to this tutorial. | |
| When you use Git, the workflow generally is toward version control only. You have a local repository where you work and a remote repository where you keep everything in sync and can work with a team and different machines. But you can also use Git to move your application to production. | |
| Server Setup | |
| Our fictitious workspace: |
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io, fmt) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64.