Skip to content

Instantly share code, notes, and snippets.

@rcugut
rcugut / node-npm-install.md
Last active February 2, 2024 11:51 — forked from DanHerbert/fix-homebrew-npm.md
Install node & npm on Mac OS X with Homebrew

DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

@hotpaw2
hotpaw2 / RecordAudio.swift
Last active April 3, 2024 03:10
Swift Audio Recording class. Reads buffers of input samples from the microphone using the iOS RemoteIO Audio Unit API
//
// RecordAudio.swift
//
// This is a Swift class (updated for Swift 5)
// that uses the iOS RemoteIO Audio Unit
// to record audio input samples,
// (should be instantiated as a singleton object.)
//
// Created by Ronald Nicholson on 10/21/16.
// Copyright © 2017,2019 HotPaw Productions. All rights reserved.
@leilee
leilee / Install iOS Simulators in Xcode Manually.md
Last active April 17, 2024 07:03
Install iOS Simulators in Xcode Manually
  • Open Xcode -> Preferences -> Components.
  • Open the Console App, clear the console.
  • Go back to the Xcode preferences. Start the simulator download, then cancel it.
  • Now in the Console, you will see something about the cancellation with the download URL.
  • Copy the URL from the Console, download it.
  • Copy this file to ~/Library/Caches/com.apple.dt.Xcode/Downloads.
    • If Downloads did not exist, create a new Downloads directory.
    • If Downloads exists, remove all *.dvtdownloadableindex files under it.
  • Open Xcode -> Preferences -> Components, start the simulator download again, it should find the file you downloaded and install it.