Skip to content

Instantly share code, notes, and snippets.

View wizardnet972's full-sized avatar
:octocat:
Angularing...

Shlomi Levi wizardnet972

:octocat:
Angularing...
View GitHub Profile
@wizardnet972
wizardnet972 / letsencrypt_2018.md
Created January 14, 2019 12:40 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@wizardnet972
wizardnet972 / docker-help.md
Created January 3, 2019 15:32 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
nginx
sudo apt-get update
sudo apt-get install nginx
check
systemctl status nginx
iisnode-full-v0.2.21-x64 (1)
node-v10.11.0-x64
rewrite_amd64_en-US (1)
var express = require('express');
var fs = require('fs');
var app = express();
import { Component } from '@angular/core';
import { Meta } from '@angular/platform-browser';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent {
constructor(private meta: Meta) {
const path = require('path');
const webpack = require('webpack');
const apiUrl = 'http://localhost:3000';
module.exports = {
outputDir: './dist/public',
chainWebpack: config => {
config.plugin('html').tap(([options]) => [
Object.assign(options, {
const path = require("path");
const fs = require("fs");
const _ = require("lodash");
const config = require("./crwl-config.json");
const Url = require("url");
const moment = require('moment');
module.exports.generate = urls => {
var uris = urls.map(url => {
return `<url>
@wizardnet972
wizardnet972 / fileupload
Created June 24, 2018 17:54
fileupload nodejs
http://localhost:3000/upload
node:
var express = require('express');
var app = express();
var path = require('path');
@wizardnet972
wizardnet972 / user
Created May 23, 2018 09:00
user component
import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-user',
encapsulation: ViewEncapsulation.Native,
template: `
{{user|json}}
`,