Skip to content

Instantly share code, notes, and snippets.

Focused on the global SoftUni expansion:

Svetlin Nakov nakov

Focused on the global SoftUni expansion:
View GitHub Profile
nakov /
Last active May 6, 2020
WordPress + MySQL on Docker Compose

Install Docker / or use Play with Docker ( with Docker Hub free registration.

Create the docker-compose.yml file, e.g. using cat > docker-compose.yml

Run the containers (WordPress and MySQL):

docker-compose up -d

Check the containers state:

nakov / ListExamples.cs
Last active Apr 21, 2020
Arrays and Lists in C#, Java, Python and JavaScript
View ListExamples.cs
// List examples in C#
using System;
using System.Collections.Generic;
using System.Linq;
class ListExamples
static void Main()
nakov / FormBulbController.cs
Last active Jan 19, 2020
ESP8266 with for Bulb control
View FormBulbController.cs
using System;
using System.Net.Http;
using System.Windows.Forms;
namespace ESP8266BulbControl
public partial class FormBulbController : Form
HttpClient http = new HttpClient();
nakov / kinvey-example.html
Created Dec 8, 2019
Kinvey Example - 12/2019
View kinvey-example.html
<!doctype html>
<meta charset="UTF-8">
<script src="kinvey-example.js"></script>
<a id='buttonLoad' href='#'>[Load]</a>
nakov / select-replace.sql
Last active Nov 25, 2019
MySQL Find / Replace in the Database via SQL commands
View select-replace.sql
SELECT REPLACE(post_title, " ", " ") FROM wp_posts
View"page.change", function() {
let runCodeLinks = $("p:contains('Run the above code example:') a");
for (let link of runCodeLinks) {
if (typeof(link.href) == "string" && link.href.startsWith("")) {
// A link is found --> check for code box above it
let codeBox = $(link).parent().prev();
if ("pre")) {
// A code box is found just before the code link --> inject the [Run] button
let runButton = $("<a href='#' class='run-code-button' style='float:right'>Run</a>");
let loadingBox = $("<span class='run-code-loading' style='float:right;display:none'>Loading …</span>");
nakov / gitbook-build.cmd
Last active Aug 1, 2019
GitBook-CLI Build & Deploy Scripts
View gitbook-build.cmd
npm install -g gitbook-cli
npm install -g serve
call gitbook install
call gitbook build . --log=debug --debug
start serve _book
start ""
nakov / AES-256-CTR-Argon2-HMAC-SHA256-example.js
Last active Jan 12, 2020
Cryptography for JavaScript Developers: Hashes, HMAC, PBKDF2, Scrypt, Argon2, AES-256-CTR, ECDSA, EdDSA, secp256k1, Ed25519
View AES-256-CTR-Argon2-HMAC-SHA256-example.js
const aes = require("aes-js");
const argon2 = require("argon2");
const crypto = require("crypto");
const cryptoJS = require("crypto-js");
// Encrypt using AES-256-CTR-Argon2-HMAC-SHA-256
async function aes256ctrEncrypt(plaintext, password) {
let argon2salt = crypto.randomBytes(16); // 128-bit salt for argon2
let argon2Settings = { type: argon2.argon2di, raw: true,
timeCost: 8, memoryCost: 2 ** 15, parallelism: 2,
nakov / HD-wallet-create-new.js
Created Nov 4, 2018
Crypto Wallets: A Technical Perspective (Nakov at OpenFest 2018) - JavaScript Code Examples
View HD-wallet-create-new.js
let ethers = require('ethers');
let rnd256Bits = ethers.utils.randomBytes(256 / 8);
let mnemonics = ethers.HDNode.entropyToMnemonic(rnd256Bits);
let hdWallet = ethers.HDNode.fromMnemonic(mnemonics);
console.log("Wallet mnemonics:", mnemonics);
for (let index=0; index<5; index++) {
let key = hdWallet.derivePath(`m/44'/60'/0'/0/${index}'`);
console.log(`Private key #${index}: ${key.privateKey}`);
View GitHub Last Push Date Check
There is a simple way to check the last events in GitHub from certain user, including all his "git push" events:{user}/events
You can’t perform that action at this time.