Skip to content

Instantly share code, notes, and snippets.

View ruslankonev's full-sized avatar
:octocat:
Make a good things

Ruslan Konev ruslankonev

:octocat:
Make a good things
View GitHub Profile
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
@ruslankonev
ruslankonev / satoshi.htm
Created December 6, 2017 16:01 — forked from rbreve/satoshi.htm
Satoshi Dice Simulator Javascript
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
body{font-family:helvetica;}
.abutton{width:350px;height:200px;}
.green{color:green;}
.red{color:red;}
@ruslankonev
ruslankonev / README.md
Created January 10, 2018 12:42 — forked from dominikwilkowski/README.md
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with

@ruslankonev
ruslankonev / async-foreach.js
Created June 1, 2018 12:06 — forked from atinux/async-foreach.js
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@ruslankonev
ruslankonev / WYSIWYG.md
Created July 5, 2018 15:10 — forked from monolithed/WYSIWYG.md
WYSIWYG редакторы

Модуль должен соответствовать следующим требованиям:

  • Свободная лицензия (в идеале)
  • API
  • Масштабировать текст по количеству символов (в идеале)
  • Быть кроссбраузерным IE9+
  • Сокращать ссылки и подсвечивать ссылки
  • Иметь защиту от XSS
  • Конфигурироваться
  • Поддерживать историю
@ruslankonev
ruslankonev / Policy.vue
Created July 5, 2018 15:51 — forked from edfialk/Policy.vue
Using Content Tools in vue
/*
* A page where users ("agents") can edit text on a page template that is filled with model data when displayed for guests.
* Uses content tools library: http://getcontenttools.com/
* Agents can enter #variable# to display client model data inside text blocks (e.g. client name, etc.)
*/
<template>
<div>
<div ref="policy"