Skip to content

Instantly share code, notes, and snippets.

@liolocs
liolocs / index.js
Last active November 11, 2024 14:03
Send local directory files to a docker container inside a remote server
#!/usr/bin/env node
const inquirer = require('inquirer');
const { execSync } = require('child_process');
async function main() {
try {
const answers = await inquirer.prompt([
{
type: 'input',
@liolocs
liolocs / index.js
Last active March 5, 2020 20:01
Commit current branch quick
#!/usr/bin/env node
const {exec} = require('child_process')
const inquirer = require('inquirer');
//inspired from https://gist.github.com/zkat/6b453b0bbb2a752aaa9ece702cb5def2
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1)))
async function main(argv) {
const args = argv.slice(2)