A blog series for PHP developers working on larger-than-average Laravel projects
Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.
const util = require('util'); | |
const fs = require('fs'); | |
const readfile = util.promisify(fs.readFile); | |
const readdir = util.promisify(fs.readdir); | |
const readlink = util.promisify(fs.readlink); | |
const stat = util.promisify(fs.stat); | |
async function getProcessRSSMemory(pid) { | |
try { |
server { | |
listen 80; | |
server_name site.com www.site.com *.site.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; | |
server_name site.com www.site.com *.site.com; | |
root /; |
The 4 C's of good technical communication:
Concision not only saves the audience time, it cuts out distracting verbiage and helps avoid burying key information in a sea of boiler plate.
Audiences very often revisit sources, and concision makes it easier to relocate particular bits of information.
Smaller pieces are easier to rearrange, and so in practice, the more concise, the more authors are likely to work out an ideal structure.
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
<script src='https://www.google.com/recaptcha/api.js?hl=de'></script> | |
check https://developers.google.com/recaptcha/docs/invisible | |
<div | |
id="header_recaptcha" | |
class="g-recaptcha" | |
data-sitekey="6LctdiQUAAAAAOTUOX92-PkGJXpZgGUp5hrq4l65" | |
data-size="invisible" | |
data-callback="recaptcha_submit" |
Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params
when you had a long URI with multiple parameters and nested routes.
Let's say you're building routes for a website www.music.com
. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.
At our application level, we could first have a Router to handle any requests to our albums.
const express = require('express');
In most programming languages, most functions are synchronous: a call to the function does all of its business in the same thread of execution. For functions meant to retrieve data, this means the data can be returned by calls to the function.
For an asynchronous function, a call to the function triggers business in some other thread, and that business (usually) does not complete until after the call returns. An asynchronous function that retrieves data via another thread cannot directly return the data to the caller because the data is not necessarily ready by the time the function returns.
In a sense, asynchronous functions are infectious: if a function foo calls an asynchronous function to conclude its business, then foo itself is asynchronous. Once you rely upon an asynchronous function to do your work, you cannot somehow remove the asynchronicity.
When the business initiated by an asynchronous function completes, we may want to run some code in response, so the code run
A curated list by Eric Elliott and friends. Suggest links in the gist comments.
Help us turn this into a proper website!
This is a very exclusive collection of only must-have JavaScript links. I'm only listing my favorite links. Nothing else makes the cut. Feel free to suggest links if you think they're good enough to make this list. The really curious should feel free to browse the comments to find other links. I can't guarantee the quality of links in the comments.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>parseTable</title> | |
</head> | |
<body> | |
<table> | |
<thead> | |
<tr> |