This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
created: <% tp.file.creation_date() %> | |
--- | |
tags:: [[+Daily Notes]] | |
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %> | |
<< [[<% fileDate = moment(tp.file.title, 'YYYY-MM-DD-dddd').subtract(1, 'd').format('YYYY-MM-DD-dddd') %>|Yesterday]] | [[<% fileDate = moment(tp.file.title, 'YYYY-MM-DD-dddd').add(1, 'd').format('YYYY-MM-DD-dddd') %>|Tomorrow]] >> | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# uncomment to debug | |
# set -x | |
echo "1️⃣. Does catalina know to create the nix directory?" | |
if ! grep nix /etc/synthetic.conf > /dev/null 2>&1; then | |
echo "nix missing from /etc/synthetic.conf. Adding it (will request sudo)" | |
echo "nix" | sudo tee -a /etc/synthetic.conf > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime_plugin | |
import os | |
class RemoteTouch(sublime_plugin.EventListener): | |
def on_post_save(self, view): | |
file_name = view.file_name() | |
needle = "PATH_FOR_YOUR_APP" # change this | |
if needle in file_name: | |
project_root = view.window().folders()[0] | |
relative_path = file_name.replace(project_root + '/', "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redis | |
God.watch do |w| | |
w.name = "redis" | |
w.interval = 30.seconds | |
w.start = "/etc/init.d/redis start" | |
w.stop = "/etc/init.d/redis stop" | |
w.restart = "/etc/init.d/redis restart" | |
w.start_grace = 10.seconds | |
w.restart_grace = 10.seconds |