Best Practice, Blogs, Guides, Lists, Web Design Inspiration & Front-end Development Tools
Before a command is executed, its input and output may be redirected using a special notation interpreted by the shell. Redirection allows commands’ file handles to be duplicated, opened, closed, made to refer to different files, and can change the files the command reads from and writes to. Redirection may also be used to modify file handles in the current shell execution environment. The following redirection operators may precede or appear anywhere within a simple command or may follow a command. Redirections are processed in the order they appear, from left to right.
Each redirection that may be preceded by a file descriptor number may instead be preceded by a word of the form {varname}
. In this case, for each redirection operator except >&-
and <&-
, the shell will allocate a file descriptor greater than 10 and assign it to {varname}
. If >&-
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
CSS ribbons are often used when you want to display something important or eye catching on your site. Placing a small piece of text as a corner ribbon of a box can be a little tricky as it involves some trigonometry.
Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.
If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.
Brewfiles are files generated with definitions that Homebrew reads and processes, a generated
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# Normalize Text by File Path (remove punctuation & ensure lowercase) | |
# | |
# - Ensure all text is lowercase. | |
# - Ensure all punctuation has been removed. | |
# | |
# Usage: | |
# |
// Create URL Slug from String in JavaScript | |
const slugify = (text) => { | |
return text | |
.toString() // Cast to string | |
.toLowerCase() // Convert the string to lowercase letters | |
.trim() | |
.normalize('NFD') // The normalize() method returns the Unicode Normalization Form of a given string. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize | |
.replace(/[\u0300-\u036f]/g, '') | |
.replace(/&|\+/g, '-and-') // Replace & or + with 'and' | |
.replace(/[^\w\s-]/g, '') // remove non-word [a-z0-9_], non-whitespace, non-hyphen characters |
Performance mode changes the system parameters of your Mac. These changes take better advantage of your hardware for demanding server applications.
A Mac with macOS Server that needs to run high-performance services can turn on performance mode to dedicate additional system resources for server applications. Note, however, that performance mode can be enabled even without macOS Server being installed to achieve similar benifits for other high-performance services.
sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"
sudo reboot
Reference: https://support.apple.com/en-us/HT202528.