Skip to content

Instantly share code, notes, and snippets.

View comchangs's full-sized avatar
🍻
Make more something.

Murry Jeong (정문창) comchangs

🍻
Make more something.
View GitHub Profile
diskutil resetUserPermissions / `id -u`
@comchangs
comchangs / nosleep.sh
Created March 19, 2020 07:04
Completely disable sleep on any Mac
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more
# Before doing anything, save your current configuration using
pmset -g
# To disable sleep
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1;
# And to go back to normal
sudo pmset -a sleep 1; sudo pmset -a hibernatemode [original hibernatemode value]; sudo pmset -a disablesleep 0;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Stream;
public class StreamTest {
private static int MAX_ITERATION = 3_000;
public static void main(String[] args) {