Skip to content

Instantly share code, notes, and snippets.

View nmccready's full-sized avatar

nmccready nmccready

View GitHub Profile

macOS 10.12 Sonoma and Up Setup

Most things should work in newer versions of macOs with slight tweaks.

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

@nmccready
nmccready / emitter.js
Created August 16, 2017 21:38
emitter extension
var Promise = require('bluebird');
var EventEmitter = require('events');
function toPromise(emitterLike) {
return new Promise(function(resolve, reject) {
emitterLike.once('finish', resolve);
emitterLike.once('end', resolve);
emitterLike.once('close', resolve);
return emitterLike.once('error', reject);
});
@nmccready
nmccready / gitSubmodulesUnFuck.sh
Last active March 22, 2024 15:09
unfuck git submodules
rm -rf $@ && git checkout origin/master $@ && git submodule update --init
@nmccready
nmccready / recurseRename.sh
Created August 7, 2020 13:55
recusive rename mult files
$ find . -name 'index.go' -type f -exec rename 's/index\.go/main\.go/' '{}' \;
@nmccready
nmccready / npmVersion.md
Created June 26, 2020 16:34
npm version described

npm version

read https://docs.npmjs.com/cli/version it's very straight forward.

Everything in npm config cli is available to be set in .npmrc like preid.

IE this allows your to define your prerelease identifier. By default npm follows this format.

MAJOR.MINOR.PATCH-PRE

@nmccready
nmccready / gulpfile.js
Created March 21, 2016 13:54
gulp 4.0 simplified with child_process spawn
'use strict'
require('./backend/extensions')
let gulp = require('gulp'),
argv = require('yargs').argv,
del = require('del'),
$ = require('gulp-load-plugins')(),
spawn = require('child_process').spawn,
os = require('os'),
@nmccready
nmccready / mono.sh
Last active April 20, 2022 01:53
parse args and forward
# !/usr/bin/env bash
ROOT_DIR=$(pwd)
helpMenu() {
echo '
-i|--install) install all dependencies
-in|--install-node) install node dependencies
-if|--install-flutter) install flutter dependencies
-h|--help) this menu
@nmccready
nmccready / gitCheckoutSingleFile.sh
Created November 23, 2021 11:43
git checkout single file
# https://stackoverflow.com/questions/1125476/retrieve-a-single-file-from-a-repository
git clone --no-checkout --depth=1 --no-tags $1
git restore --staged $2
git checkout $2
@nmccready
nmccready / classes.dart
Last active August 19, 2021 03:22
Dart Notes
void main() {
final p = new Employee("Nick", height: 5.8, weight: 210, age: 41, taxCode: "123", salary: 2000000);
print(p.toString());
}
mixin Health {
String getLifePercentage(int age) => (100 * (age / 101.00)).toStringAsFixed(3);
double getBMI(double height, double weight) => weight / (height * height);
}