Skip to content

Instantly share code, notes, and snippets.

View nickojs's full-sized avatar

Nic nickojs

  • remote
View GitHub Profile
@wirwolf
wirwolf / ecosystem.json
Created June 14, 2018 20:13
pm2 ecosystem.json config example
{
"apps": [
{
/* General */
"name": "my-api", /* (string) application name (default to script filename without extension) */
"script": "index.js", /* (string) script path relative to pm2 start */
"cwd": "/var/www/", /* (string) the directory from which your app will be launched */
"args": "-a 13 -b 12", /* (string) string containing all arguments passed via CLI to script */
"interpreter": "/usr/bin/python", /* (string) interpreter absolute path (default to node) */
"interpreter_args": "--harmony", /* (string) option to pass to the interpreter */
@Ivan-Feofanov
Ivan-Feofanov / getMethods.js
Last active July 25, 2023 19:24
Get list of association methods of model in Sequelize
const model = %yourSequelizeModel%
for (let assoc of Object.keys(model.associations)) {
for (let accessor of Object.keys(model.associations[assoc].accessors)) {
console.log(model.name + '.' + model.associations[assoc].accessors[accessor]+'()');
}
}
@davecan
davecan / open_powershell_here.md
Last active July 7, 2024 22:08
How to enable "Open PowerShell Here" context menu in Windows 10
@yagop
yagop / insomnia.sh
Created April 21, 2017 11:21
Insomnia REST Client Arch installer
#! /bin/bash
cd $(mktemp -d)
wget https://aur.archlinux.org/cgit/aur.git/snapshot/insomnia.tar.gz
tar xzf insomnia.tar.gz
cd insomnia
makepkg -s
sudo pacman -U insomnia-*-x86_64.pkg.tar