Skip to content

Instantly share code, notes, and snippets.

View dmk's full-sized avatar

Dmytro Koval dmk

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dmk on github.
  • I am dkkoval (https://keybase.io/dkkoval) on keybase.
  • I have a public key ASAQo9tjawPWhkOvlu1BljwUA1pBJ6XPrql0P0SO1mFx6Ao

To claim this, I am signing this object:

@dmk
dmk / git-subtree-basics.md
Last active September 2, 2019 14:25 — forked from SKempin/Git Subtree basics.md
Git Subtree Basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

Keybase proof

I hereby claim:

  • I am dmk on github.
  • I am dkoval (https://keybase.io/dkoval) on keybase.
  • I have a public key ASD99ihSDxW-tHLU0LXt4qXqwP88gLX1ml4Fq0cjFcXJUgo

To claim this, I am signing this object:

Column order had a big performance impact on some of the databases I've tuned, spanning Sql Server, Oracle, and MySQL. This post has good rules of thumb:

  • Primary key columns first
  • Foreign key columns next.
  • Frequently searched columns next
  • Frequently updated columns later
  • Nullable columns last.
  • Least used nullable columns after more frequently used nullable columns
  • An example for difference in performance is an Index lookup. The database engine finds a row based on some conditions in the index, and gets back a row address. Now say you are looking for SomeValue, and it's in this table:
0x06c0cac3b5a0cefb2445b077a0458cbb38cbd687
0x3147f27ab9f15368982e64f872a2259a4df479a8
@dmk
dmk / README.md
Last active December 22, 2017 00:26
Sending money to XRP testnet accounts
  1. Run npm install ripple-lib
  2. Go to xrp testnet website
  3. Click Generate credentials
  4. Run the script:
node tx.js DESTINATION_ADDR SOURCE_ADDR SOURCE_SECRET AMOUNT
@dmk
dmk / vue.md
Last active September 3, 2017 23:11

ue.js

Vue is positioned as progressive javascript frontend framework. It is inspired of MVVM pattern, so no controllers here. I'd like to say vue app is kind of event-driven.

Organizing the code

We have 2 ways of structuring the code:

<!DOCTYPE html>
<html>
<head>
<title>Calendar</title>
<style>
div.input {
margin-bottom: 10px;
}
.month {

Frontend Specs

Prerequisites:
  • node
  • npm

Setup