Skip to content

Instantly share code, notes, and snippets.

View JoeyBurzynski's full-sized avatar
💭
Hacking away on @EdgeSEO tools.

Joey Burzynski JoeyBurzynski

💭
Hacking away on @EdgeSEO tools.
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / web-design-inspiration-and-best-front-end-development-tools.md
Last active February 8, 2024 12:26
Web Design Inspiration: Best Practice, Blogs, Guides, Lists, Web Design Inspiration & Front-end Development Tools
@JoeyBurzynski
JoeyBurzynski / Reference: Bash Redirection - How to Use Bash Redirection.md
Created May 4, 2022 10:22
Reference: Bash Redirection - How to Use Bash Redirection

Reference: Bash Redirection

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';
@JoeyBurzynski
JoeyBurzynski / enough-python.ipynb
Created April 2, 2022 19:19 — forked from aparrish/enough-python.ipynb
Just enough Python!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JoeyBurzynski
JoeyBurzynski / understanding-word-vectors.ipynb
Created April 2, 2022 19:15 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JoeyBurzynski
JoeyBurzynski / how-to-create-a-corner-ribbon-in-pure-css.md
Last active May 2, 2022 05:31
How to Create a Corner Ribbon in Pure CSS

How to Create a Corner Ribbon with CSS

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.

How to Create a Corner Ribbon in Pure CSS

@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active April 4, 2024 09:44
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

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

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@JoeyBurzynski
JoeyBurzynski / normalize-text.sh
Created August 31, 2021 09:16
Bash Script: Normalize Text by File Path (Remove Punctuation & Ensure Lowercase)
#!/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:
#
@JoeyBurzynski
JoeyBurzynski / slugify.js
Last active January 31, 2023 22:10
Create URL Slug from String in JavaScript
// 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

Enable macOS Server Performance Mode

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.