Skip to content

Instantly share code, notes, and snippets.

View arteika's full-sized avatar

arthur arteika

View GitHub Profile
@paigen11
paigen11 / findUser.js
Created September 4, 2018 20:50
Passport local and Passport JWT authentication with custom callbacks examples with a user registration MERN service.
import passport from 'passport';
module.exports = app => {
app.get('/findUser', (req, res, next) => {
passport.authenticate('jwt', { session: false }, (err, user, info) => {
if (err) {
console.log(err);
}
if (info != undefined) {
console.log(info.message);
@dahlbyk
dahlbyk / init.coffee
Created June 9, 2017 15:30
Atom Command + Keymap to Disable vim-mode-plus
atom.commands.add 'atom-text-editor',
'user:toggle-vim-mode': (event) ->
if atom.packages.isPackageDisabled("vim-mode-plus")
atom.packages.enablePackage("vim-mode-plus")
else
atom.packages.disablePackage("vim-mode-plus")
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active November 8, 2024 00:56
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target