Skip to content

Instantly share code, notes, and snippets.

@djagya
djagya / jest.config.js
Created September 8, 2020 12:05
Jest config to debug in WebStorm when using TSDX
const {createJestConfig} = require('tsdx/dist/createJestConfig');
const {paths} = require('tsdx/dist/constants');
process.env.BABEL_ENV = 'test';
process.env.NODE_ENV = 'test';
const config = createJestConfig(undefined, paths.appRoot);
// For absolute imports
config.modulePaths = ["<rootDir>/src"];
@djagya
djagya / terraria.service
Last active August 29, 2024 19:34
Terraria server in screen systemd service
# /etc/systemd/system/terraria.service
[Unit]
Description=Server daemon for Terraria with base directory /opt/terraria
After=network.target
[Service]
WorkingDirectory=/opt/terraria
User=terraria
Restart=always
@djagya
djagya / do-nothing-example.py
Created August 1, 2019 16:51
Example of Do-Nothing automation script
import sys
def wait_for_enter():
raw_input("Press Enter to continue: ")
class CreateSSHKeypairStep(object):
def run(self, context):
print("Run:")
print(" ssh-keygen -t rsa -f ~/{0}".format(context["username"]))
wait_for_enter()