Skip to content

Instantly share code, notes, and snippets.

View pavelsalauyou's full-sized avatar
🏠
Working from home

Pavel Salauyou pavelsalauyou

🏠
Working from home
View GitHub Profile
@pavelsalauyou
pavelsalauyou / default.conf
Created March 11, 2020 11:07
Configuring nginx to serve an Angular 8+ project with a Symfony 4 (or 5) backend project in a subdirectory
server {
server_name example.com;
root /var/www/example.com/dist/example;
try_files $uri $uri/ /index.html;
location /backend {
alias /var/www/example.com/backend/public;
try_files $uri $uri/ @backend;
location ~ ^/backend/index\.php(/|$) {
@pavelsalauyou
pavelsalauyou / global-variables-are-bad.js
Created March 7, 2017 06:25 — forked from hallettj/global-variables-are-bad.js
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {