Skip to content

Instantly share code, notes, and snippets.


Viktor Evdokimov viktor-evdokimov

View GitHub Profile
onlurking /
Last active Aug 6, 2022
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a > written representation of the program, and it's lossy, so you can't reconstruct

castwide / rails.rb
Last active Aug 13, 2022
Enhance Rails Intellisense in Solargraph
View rails.rb
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
# @!parse
# class ActionController::Base
viktor-evdokimov / Untitled-3
Last active Apr 5, 2018
return which shell is used
View Untitled-3
# return which shell is used
> echo $0
gricard /
Last active Jun 3, 2021
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here:

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
terabyte /
Created Dec 6, 2017
Amazon's Build System


I wrote this answer on stackexchange, here:

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?


Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

troyfontaine /
Last active Aug 13, 2022
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

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


FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

blainerothrock / gen.swift
Last active Jul 12, 2018
A Very Simple Genetic Algorithm Written in Swift 3
View gen.swift
#!/usr/bin/env xcrun swift -O
gen.swift is a direct port of cfdrake's from Python 2.7 to Swift 3
-------------------- ---------------------
gen.swift implements a genetic algorithm that starts with a base
population of randomly generated strings, iterates over a certain number of
generations while implementing 'natural selection', and prints out the most fit
The parameters of the simulation can be changed by modifying one of the many
danielberkompas / scheduler.ex
Created Oct 26, 2016
A simple mix task scheduler for Elixir apps
View scheduler.ex
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.