<commit_before>![Image](https://farm1.staticflickr.com/580/33704162375_e0883536cf_o.png)

# NightPatch

Enable Night Shift on any old Mac models.

You have to disable SIP (System Integrity Protection) before applying. [How to disable SIP](http://apple.stackexchange.com/a/209530)

Backup your Mac before applying.

Not compatible with some third-party monitors.

Referenced [Pike's blog](https://pikeralpha.wordpress.com/2017/01/30/4398/).

## Supported macOS build

- macOS 10.12.4 (16E195)

- macOS 10.12.5 Developer Preview 1 (16F43c)

- macOS 10.12.5 Developer Preview 2 (16F54b)

- macOS 10.12.5 Developer Preview 3 (16F60a)

- macOS 10.12.5 Public Beta 1 (16F43c)

- macOS 10.12.5 Public Beta 2 (16F54b)

## How to patch

Enter this command on Terminal **without $**.

`$ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; ./NightPatch.sh`

## How to revert

You can revert using backup located at /Library/NightPatch. (NightPatch creates backup automatically when you patch your macOS) Enter this command on Terminal **without $**.

`$ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; ./NightPatch.sh -revert`

If you deleted backup (or not backed up), enter this command on Terminal **without $**. NightPatch will download original system file from Apple. (**Only for macOS 10.12.4 (16E195)**.)

`$ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; ./NightPatch.sh -revert combo`

## Troubleshooting

- patch/BUILD.patch is missing.

: That’s because I didn’t make a patch file for your macOS. I’ll make for you when it possible.

- ERROR : Turn off System Integrity Protection before doing this. / ERROR : Can't write a file to root.

: [Solution](http://apple.stackexchange.com/a/209530)<commit_msg>Changed run command<commit_after>![Image](https://farm1.staticflickr.com/580/33704162375_e0883536cf_o.png)

# NightPatch

Enable Night Shift on any old Mac models.

You have to disable SIP (System Integrity Protection) before applying. [How to disable SIP](http://apple.stackexchange.com/a/209530)

Backup your Mac before applying.

Not compatible with some third-party monitors.

Referenced [Pike's blog](https://pikeralpha.wordpress.com/2017/01/30/4398/).

## Supported macOS build

- macOS 10.12.4 (16E195)

- macOS 10.12.5 Developer Preview 1 (16F43c)

- macOS 10.12.5 Developer Preview 2 (16F54b)

- macOS 10.12.5 Developer Preview 3 (16F60a)

- macOS 10.12.5 Public Beta 1 (16F43c)

- macOS 10.12.5 Public Beta 2 (16F54b)

## How to patch

Enter this command on Terminal **without $**.

`$ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; ./NightPatch.sh`

## How to revert

You can revert using backup located at /Library/NightPatch. (NightPatch creates backup automatically when you patch your macOS) Enter this command on Terminal **without $**.

`$ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; ./NightPatch.sh -revert`

If you deleted backup (or not backed up), enter this command on Terminal **without $**. NightPatch will download original system file from Apple. (**Only for macOS 10.12.4 (16E195)**.)

`$ $ cd /tmp; curl -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; ./NightPatch.sh -revert combo`

## Troubleshooting

- patch/BUILD.patch is missing.

: That’s because I didn’t make a patch file for your macOS. I’ll make for you when it possible.

- ERROR : Turn off System Integrity Protection before doing this. / ERROR : Can't write a file to root.

: [Solution](http://apple.stackexchange.com/a/209530)
{'fraction_non_alphanumeric': 0.11840796019900497, 'fraction_numerical': 0.05771144278606965, 'mean_word_length': 4.077020202020202, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6139220', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1345, 'n_words': 438}