npm i eslint eslint-loader eslint-plugin-vue --save-dev
# /usr/local/vesta/data/templates/web/apache2/laravel.stpl | |
<VirtualHost %ip%:%web_ssl_port%> | |
ServerName %domain_idn% | |
%alias_string% | |
ServerAdmin %email% | |
DocumentRoot %sdocroot%/public/ | |
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ | |
Alias /vstats/ %home%/%user%/web/%domain%/stats/ |
I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.
Each file should be put in /usr/local/vesta/data/templates/web/apache2
Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
Instructions:
npm install express faye-websocket ssh2 term.js
- Create a
public
subdirectory - Place
client.htm
inpublic
- Edit the ssh connection details in
server.js
. See the documentation for theconnect()
method in the ssh2 readme for more information. - Start the server with
node server.js
- Visit http://localhost:8000/client.htm in a WebSocket-capable browser
var Client = require('ssh2').Client; | |
var readline = require('readline') | |
var conn = new Client(); | |
conn.on('ready', function() { | |
console.log('Client :: ready'); | |
conn.shell(function(err, stream) { | |
if (err) throw err; | |
// create readline interface | |
var rl = readline.createInterface(process.stdin, process.stdout) |
<?php namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
/** | |
* If the incoming request is an OPTIONS request | |
* we will register a handler for the requested route | |
*/ | |
class CatchAllOptionsRequestsProvider extends ServiceProvider { |
I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.
It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.
Today I refuse to use it in my next project myself.
This document presents a simple way to manage your Docker resource by using Portainer as a gateway (HTTP queries against the Portainer API).
WARNING: This documentation is valid for Portainer >= 1.18.0.
NOTE: I'm using httpie to execute HTTP queries from the CLI.
import { Injectable } from 'angular2/core'; | |
import { Storage } from './storage'; | |
import { CurrentUser } from '../interfaces/common'; | |
@Injectable() | |
export class Authentication{ | |
private _storageService : Storage; | |
private _userKey : string = "CURRENT_USER"; | |
constructor(storageService : Storage){ |