Skip to content

Instantly share code, notes, and snippets.

Avatar

Danil Zakablukovskii djagya

View GitHub Profile
@djagya
djagya / jest.config.js
Created Sep 8, 2020
Jest config to debug in WebStorm when using TSDX
View jest.config.js
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 Jun 7, 2020
Terraria server in screen systemd service
View terraria.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 Aug 1, 2019
Example of Do-Nothing automation script
View do-nothing-example.py
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()
You can’t perform that action at this time.