Skip to content

Instantly share code, notes, and snippets.

View viktor-evdokimov's full-sized avatar
👷‍♂️
Focusing

Viktor Evdokimov viktor-evdokimov

👷‍♂️
Focusing
View GitHub Profile
@viktor-evdokimov
viktor-evdokimov / 1-setup-git-gpg.md
Last active July 12, 2022 19:40 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with GPG on MacOS

Last updated June 23, 2022

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

require 'csv'
require 'open-uri'

csv_text = open('http://www.vvv.hh.yyy.ggg/~hhhh/uuuu.csv')
csv = CSV.parse(csv_text, :headers=>true)
csv.each do |row|
  puts row
end
@viktor-evdokimov
viktor-evdokimov / introrx.md
Created May 25, 2018 17:00 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@viktor-evdokimov
viktor-evdokimov / pre-push.sh
Created July 14, 2017 22:38 — forked from pixelhandler/pre-push.sh
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@viktor-evdokimov
viktor-evdokimov / git-reup
Created May 24, 2017 01:08 — forked from righi/git-reup
git-reup
#!/usr/bin/env ruby
#
# Usage: git-up
# git-reup
#
# Like git-pull but show a short and sexy log of changes
# immediately after merging (git-up) or rebasing (git-reup).
#
# Inspired by Kyle Neath's `git up' alias:
# http://gist.github.com/249223
@viktor-evdokimov
viktor-evdokimov / postgres-cheatsheet.md
Created May 10, 2017 14:41 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@viktor-evdokimov
viktor-evdokimov / main.go
Created February 11, 2017 00:46 — forked from ssimunic/main.go
Monitor web page changes with Go
package main
import (
"net/http"
"io/ioutil"
"time"
"log"
"os"
)
@viktor-evdokimov
viktor-evdokimov / scheduler.ex
Created November 10, 2016 13:55 — forked from danielberkompas/scheduler.ex
A simple mix task scheduler for Elixir apps
defmodule MyApp.Scheduler do
@moduledoc """
Schedules a Mix task to be run at a given interval in milliseconds.
## Options
- `:task`: The name of the Mix task to run.
- `:args`: A list of arguments to pass to the Mix task's `run/1` function.
- `:interval`: The time interval in millisconds to rerun the task.
@viktor-evdokimov
viktor-evdokimov / app.py
Created November 2, 2016 20:30 — forked from developer-rakeshpaul/app.py
Falcon App start up file with Flask like routes
import falcon
import os
from app.db import db_session
from app.utils.exceptions import build_error_response
from app.startup import (autoload, add_routes)
wsgi_app = falcon.API(after=[db_session.remove_session])
autoload("{0}/{1}".format(os.path.dirname(__file__), "handlers"))
@viktor-evdokimov
viktor-evdokimov / DDD CQRS ES Architecture videos.md
Last active October 25, 2016 22:19 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht