Regular: npm install pkg
, Shorthand: npm i pkg
.
Regular: npm i --global pkg
, Shorthand: npm i -g pkg
.
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.
#!/usr/bin/env bash | |
# Synchronize content from remote Ubuntu instance to local file path with rsync via SSH | |
function syncUbuntuInstance () { | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo | |
echo "What the hell am I trying to sync? Give me a user and hostname." | |
echo "Usage: $0 <ssh user> <hostname>" | |
echo | |
exit 0 |
#!/bin/bash | |
# Bash Script: Change All Files Extension in a Folder | |
# Usage: change-file-extensions <current file extension> <new file extension> | |
# Example: change-file-extensions xml json | |
function changeFileExtensions() { | |
if [[ -z $1 || -z $2 ]]; then | |
echo | |
echo "What file extensions am I working with? Please provide <current> and <new>." |
# Define words to search for "matching patterns" | |
PATTERN_TYPES = { | |
# %w is just short hand to create an array of strings | |
camouflage: %w[ | |
a-tacs | |
bonz | |
camo | |
camoflage | |
camouflage | |
harvest moon |
db.getCollection("caltrend").aggregate( | |
// Pipeline | |
[ | |
// Stage 1 | |
{ | |
$project: { | |
_id : 1, | |
vendor_part_number: "$PartNumber", | |
vendor: "$BrandLabel", |
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
# Generate $prerender_ua bool value based on user agent | |
# indexation bots will get this as 1, | |
# prerender user agent will always get 0 (avoid loops) | |
map $http_user_agent $prerender_ua { | |
default 0; |