Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active December 1, 2023 16:48
macOS Internals
View macOS Internals.md

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@dvgamerr
dvgamerr / docker-synology.md
Created January 20, 2021 05:30
cronjob with docker Synology NAS and stop notification.
View docker-synology.md
  1. create docker container and not check autostart.
  2. Control Panel > Task Scheduler and create job with command
docker container start task-notify-github
  1. after container finish synology alert notification Docker container ... stopped unexpectedly. access terminal and update update config with command
@GrfxGuru
GrfxGuru / bootstrap_mac.sh
Last active October 23, 2022 17:05
My bootstrap for setting up a new macOS machine
View bootstrap_mac.sh
#!/usr/bin/env bash
#
# Bootstrap script for setting up a macOS machine
#
#
echo "Remember to install Xcode from the Store first"
echo "Starting bootstrapping"
@greg76
greg76 / pocketmine.sh
Last active March 26, 2020 10:54
simple shell script to run pocketmine as a service/daemon
View pocketmine.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: pocketmine
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@karpathy
karpathy / min-char-rnn.py
Last active December 1, 2023 14:51
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@Valodim
Valodim / gist:7017924
Last active July 8, 2022 21:53
zsh json parser (WIP)
View gist:7017924
#!/bin/zsh
typeset -A closings
closings=( '{' '}' '[' ']' )
# usage: find-matching strvar pos
# heart of the parser. matches one "element." matching depends on first
# character (at pos), can be " for string matching or any in closings
# associative parameter.