Skip to content

Instantly share code, notes, and snippets.

View galtsev's full-sized avatar

Denys Galtsev galtsev

View GitHub Profile
@galtsev
galtsev / services.gv
Created September 23, 2020 07:34
services
graph G {
MediaHost -- AWS_S3
Frontend -- Backend
Backend -- {Queue, Postgres,AWS_S3}
{Queue, AWS_S3} -- Recognizer
Recognizer -- FingerprintDB
}
@galtsev
galtsev / MyCustom.sublime-color-scheme
Last active July 7, 2019 14:13
Sublime color scheme
{
"name": "MyCustom",
"author": "Dan",
"variables":
{
"comment": "limegreen",
"literal": "blue",
"definition": "mediumblue",
"selection": "aqua",
"highlight": "lime",
@galtsev
galtsev / magic_square.py
Created May 17, 2019 16:06
sat solver example
from ortools.sat.python import cp_model
def run():
model = cp_model.CpModel()
vars = []
for i in range(9):
vars.append(model.NewIntVar(1, 9, str(i)))
model.AddAllDifferent(vars)
@galtsev
galtsev / 20-kbd.conf
Created December 3, 2018 13:47
xorg keyboard ru
Section "InputClass"
Identifier "keyboard-layout"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:caps_toggle,grp_led:scroll"
EndSection
@galtsev
galtsev / gist:d9f8f8975083ff22ad16f30de5d6acca
Created September 5, 2018 13:25
Fix web page for mobile
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
...
</head>
@galtsev
galtsev / user_settings.json
Created November 10, 2017 15:54
vscode user settings
{
"editor.fontSize": 14,
// final line without trailing comma
"jake.autoDetect": "on",
"window.zoomLevel": 2,
"workbench.colorTheme": "Visual Studio Light",
"editor.minimap.enabled": false,
"editor.snippetSuggestions": "none",
"editor.suggestOnTriggerCharacters": false,
"editor.wordBasedSuggestions": false,
@galtsev
galtsev / purescript.json
Created November 8, 2017 14:06
purescript unicode snippets for vscode
{
/*
// Place your snippets for PureScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@galtsev
galtsev / self-signed.md
Created June 9, 2017 08:50
self-signed certificate
@galtsev
galtsev / rand_geom.py
Created April 20, 2017 13:32
generate geometrically distributed numbers from uniformly distributed
# https://math.stackexchange.com/questions/485448/prove-the-way-to-generate-geometrically-distributed-random-numbers
import math
import random
N = 100
M = 1000000
p = 0.1 #use 0.01 for actual distribution
def expected():
res = []
startup_message off
vbell off
hardstatus alwayslastline
hardstatus string '%{= kG}%-Lw%{= kW}%50> %n*%f %t%{= kG}%+Lw%< %{= kG}%-=%D %m/%d/%y | %C:%s %A | %1`%{-}'
bindkey ^[[5;5~ prev
bindkey ^[[6;5~ next