Skip to content

Instantly share code, notes, and snippets.

View sorokinvj's full-sized avatar
🦋

Vladislav Sorokin sorokinvj

🦋
View GitHub Profile
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function getAgentSign(missionId) {
let signs = get(/databases/$(database)/documents/missions/$(missionId)).data.agentSigns;
return signs[request.auth.uid] ?? 'Ophiuchus';
}
function isAstroSpymaster() {
return request.auth.token.role == 'astro-spymaster';
@sorokinvj
sorokinvj / How_to_enable_rc.local_with_Systemd.md
Last active September 2, 2024 20:53
How to Enable /etc/rc.local with Systemd

from here – https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd

How to Enable /etc/rc.local with Systemd

If you are running a Linux distro that uses Systemd, then you may find that your command in /etc/rc.local file would not run on system boot. This guide explains how to enable /etc/rc.local script to run on system startup. If you type the following command in terminal:

sudo systemctl status rc-local
@sorokinvj
sorokinvj / Running a Node.js application using nvm as a systemd service.md
Last active April 22, 2019 14:01 — forked from joepie91/.md
Running a Node.js application using nvm as a systemd service

Running a Node.js application using nvm as a systemd service

Trickier than it seems.

1. Set up nvm

Let's assume that you've already created an unprivileged user named myapp. You should never run your Node.js applications as root!

Switch to the myapp user, and do the following: