Skip to content

Instantly share code, notes, and snippets.

@greg76
greg76 / pocketmine.sh
Last active March 26, 2020 10:54
simple shell script to run pocketmine as a service/daemon
#!/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
@dvgamerr
dvgamerr / docker-synology.md
Created January 20, 2021 05:30
cronjob with docker Synology NAS and stop notification.
  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
@Valodim
Valodim / gist:7017924
Last active July 8, 2022 21:53
zsh json parser (WIP)
#!/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.
@GrfxGuru
GrfxGuru / bootstrap_mac.sh
Last active October 23, 2022 17:05
My bootstrap for setting up a new macOS machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a macOS machine
#
#
echo "Remember to install Xcode from the Store first"
echo "Starting bootstrapping"
@kconner
kconner / macOS Internals.md
Last active May 25, 2024 19:26
macOS Internals

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:

@rsms
rsms / macos-distribution.md
Last active May 27, 2024 11:54
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@karpathy
karpathy / min-char-rnn.py
Last active May 29, 2024 10:18
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
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)