Skip to content

Instantly share code, notes, and snippets.

View nlopin's full-sized avatar
🗣️
A-a-a-a-a

Nikolai Lopin nlopin

🗣️
A-a-a-a-a
View GitHub Profile
@nlopin
nlopin / index.html
Created May 29, 2022 16:33
JSON convert demo
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Демонстрация преобразования — JSON — Дока</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto&display=swap">
<style>
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-20.04"
(1..3).each do |i|
config.vm.define "nginx#{i}" do |node|
node.vm.hostname = "nginx#{i}"
const promise = new Promise(function(resolve, reject) {
const data = ... // асинхронная операция: запрос в БД, API, etc.
resolve(data); // переводим промис в состояние fulfilled и отдаем наружу результат операции
});
@nlopin
nlopin / cmd-lang.json
Last active April 11, 2020 22:09
Karabiner config: Left CMD → EN, right CMD → RU
{
"title": "Non-modal input language change",
"rules": [
{
"description": "Switch to RU",
"manipulators": [
{
"conditions": [
{
"input_sources": [
@nlopin
nlopin / input_change.json
Created June 24, 2019 13:37
Karabiner: Non modal language switch to RU and EN
{
"title": "Non-modal input language change",
"rules": [
{
"description": "Switch to RU",
"manipulators": [
{
"conditions": [
{
"input_sources": [

Keybase proof

I hereby claim:

  • I am nlopin on github.
  • I am lopin (https://keybase.io/lopin) on keybase.
  • I have a public key ASBsguUl-Hfr6mQNM1XDkGZgk-b2W6pOnhpoqKDLCTIlvAo

To claim this, I am signing this object:

@nlopin
nlopin / Instant View
Created May 28, 2017 11:10
Эгея Instant View для Telegram
?path: /all/.+
title: //h1[@class="e2-note-title"]
body: //article
author: //span[@id="e2-blog-author"]
author_url: <ссылка на сайт>
published_date: //div[@class="e2-note-date"]
channel: <ссылка на канал если есть>
cover: //article//img[1]