sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
These are notes from my efforts to get Ubuntu 20.04 installed on my older MacBook Pro. I'm making this gist public in the hopes that it's helpful to others.
I did a Minimal install, but selected the option to install additional 3rd-party drivers.
Wifi doesn't work during the install (because it requires a 3rd-party driver), so you won't be able to choose to download updates while installing. No big deal, run a software update after the install.
The installer takes about 25 minutes to complete. Post-install, most things work. The only driver I had to manually install was for the FaceTime camera. More on that below.
interface Composable<B,C> { | |
(b: B): C; | |
I: <D>(f: (c: C) => D) => Composable<B,D>; | |
o: <A>(f: (a: A) => B) => Composable<A,C>; | |
} | |
/* | |
* Non-type safe internal function - type safety of result is guaranteed by | |
* allowing creation only through `I` and `o` functions and methods | |
*/ |
// | |
// The code snippets below showcase common "problem code" that can take a long time to compile. | |
// These examples were primarily observed in Swift 2/3 and may no longer be relevant in Swift 4 or higher. | |
// | |
/// 1. Array concatenation | |
// Observed by Robert Gummesson - https://medium.com/@RobertGummesson/regarding-swift-build-time-optimizations-fc92cdd91e31#c75c | |
// Joining two arrays together with the '+' operator can be expensive to compile. | |
let someArray = ["a", "b"] + ["c", "d"] |
// Swift 4 | |
// Check out the history for contributions and acknowledgements. | |
extension String { | |
/// Returns a new string made by replacing all HTML character entity references with the corresponding character. | |
/// | |
/// - Returns: decoded string | |
func decodingHTMLEntities() -> String { | |
var result = String() | |
var position = startIndex |
// Note: to add a JPEG COM marker go here: | |
// https://gist.github.com/nyg/bdeae8190a41b4b56bde8e13dd471ecc | |
import Foundation | |
import ImageIO | |
#if os(iOS) | |
import MobileCoreServices | |
#endif |
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
#!/bin/bash | |
#Path to swiftlint | |
SWIFT_LINT=/usr/local/bin/swiftlint | |
#if $SWIFT_LINT >/dev/null 2>&1; then | |
if [[ -e "${SWIFT_LINT}" ]]; then | |
count=0 | |
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do | |
export SCRIPT_INPUT_FILE_$count=$file_path |
# one or the other, NOT both | |
[url "https://github"] | |
insteadOf = git://github | |
# or | |
[url "[email protected]:"] | |
insteadOf = git://github |
I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.
The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.
I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.
I’ve made this according to the installation instructions given on GetGrav.