useWindowSize.js
:
import {useState, useEffect} from 'react';
const REFRESH_TIMEOUT = 150;
const useWindowSize = () => {
const getSize = () => ({
width: window.innerWidth
|| document.documentElement.clientWidth
useWindowSize.js
:
import {useState, useEffect} from 'react';
const REFRESH_TIMEOUT = 150;
const useWindowSize = () => {
const getSize = () => ({
width: window.innerWidth
|| document.documentElement.clientWidth
plugins
folder by following the official documentation.gatsby-node.js
file:
const path = require('path')
A step-by-step guide for running a headless Raspbian 64bit kernel and OS on Raspberry Pi. The provided configuration has been tested on models 3B, 3B+ and 4B.
Download the Raspberry Pi Imager application.
Use the application to download Raspbian Lite (under Raspbian (other)) and write the image on your SD card.
Setup wireless connection configuration by creating wpa_supplicant.conf
file in the boot folder:
If your CPU clock is constantly running at high frequency, consuming too much power and keeping the laptop constantly hot, consider using cpupower
and mbpfan-git
packages:
yaourt -S mbpfan-git cpupower
sudo systemctl enable mbpfan
sudo systemctl enable cpupower
The mbpfan-git
controls fan actions while cpupower
sets CPU governor to configured performance mode set in /etc/default/cpupower
file:
A simple secure SFTP setup.
New users have disabled bash and similar shells, are allowed to authenticate with password, and are jailed in their home directory.
The initial setup to prepare for an easy user management.
Disable password authentication for all users with an exception for sftp-only
group.
This gist will guide you through the setup of a basic Nginx web server using Debian-based Linux distribution.
It is primarily focused on securing the access to the server via various protocols and limiting user permissions.
ssh root@SERVER-IP