Skip to content

Instantly share code, notes, and snippets.

@imShara
imShara / how-to-make-ssh-connection-to-device-behind-nat.md
Last active September 12, 2019 08:38
How to make SSH connection to device behind NAT

How to make SSH connection to device behind NAT

On natted device:

  1. Run sshd daemon
# systemctl start sshd
@imShara
imShara / eslint-nuxt-fix-on-save.md
Created August 24, 2019 10:36
ESlint automatically fix on file save with Nuxt

Old Way

Suggested by lcaprini

// nuxt.config.js
build: {
  extend(config, ctx) {
    if (ctx.dev && ctx.isClient) {
      config.module.rules.push({
 enforce : 'pre',
@imShara
imShara / mod_http_upload-nginx_reverse_proxy.md
Created August 16, 2019 18:41
Ejabberd (19.08+) mod_http_upload and Nginx reverse-proxy

If we have xmpp server on host domain.tld and want serve files from https://xmpp.domain.tld/upload/…

/etc/ejabberd/ejabberd.yml


listen
  port: 5280
  ip: "127.0.0.1"
 module: ejabberd_http
@imShara
imShara / tg-fuck-signwall.js
Last active October 20, 2018 13:02
Greasemonkey script that adds buttons to show more posts of telegram channel in browser
// ==UserScript==
// @name Telegram channel navigation
// @description Fixes WEB with adding buttons to show more posts of telegram channel in browser
// @author Shara
// @version 1
// @include /^https://(www\.)?t\.me/\w+/\d+/?$/
// @grant none
// ==/UserScript==
let showBy = 10
@imShara
imShara / Install-Archlinux-in-Linux-Deploy-with-ssh-fix-and-working-aur.md
Created January 17, 2018 01:04
Установка Archlinux в LinuxDeploy с фиксом ssh и рабочим aur

Установка Archlinux в LinuxDeploy с фиксом ssh и рабочим aur

Устанавливаем в LinuxDeploy

Как обычно ¯_(ツ)_/¯

Фиксим SSH — extra/ssh fail (sshd segmentation fault)

В настройках LinuxDeploy активируем Telnet Подключаемся к telnet серверу LinuxDeploy

$ telnet localhost 5023
@imShara
imShara / translate
Created April 28, 2015 11:27
Bash non-api context translation with Google Translate
#!/bin/bash
# Author: Shara
# Screenshot: http://i.imgur.com/pksgFLA.png
# Install:
# 1. Put to "/usr/local/sbin/translate"
# 2. Set "chmod +x translate"
# 3. Set hotkey with command "translate %LANG%" where %LANG% is result language