Skip to content

Instantly share code, notes, and snippets.

@akochepasov
akochepasov / header_cpp.h
Created October 14, 2025 21:02
Coder header
/******** Header File ********/
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <queue>
@akochepasov
akochepasov / rsync.sh
Last active September 29, 2025 19:47
rsync
# Complete sync, but skip book from the list
rsync -avu --delete --exclude=books /dir/from /dir/to
@akochepasov
akochepasov / svn2git.txt
Created September 5, 2025 23:53
svn2git
# Main idea
1 get authors
svn log -q | awk -F '|' '/^r/ {gsub(/ /, "", $2); sub(" $", "", $2); print $2" = "$2" <"$2"@email.com>"}' | sort -u > users.txt
2 clone svn
git svn clone --prefix=svn/ --stdlayout --no-metadata --authors-file=users.txt https://svn_server/svn/repo
3 add new origin
git remote add origin [email protected]:user/repo.git
git push -u origin --all
# More clones
@akochepasov
akochepasov / short_term_alpha.ipynb
Created September 5, 2025 23:45 — forked from sebjai/short_term_alpha.ipynb
Market Making in Short-Term Alpha (Chapter 10.4.2 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akochepasov
akochepasov / jira_filters.md
Created February 26, 2025 18:37
Jira filters

Done last sprint

(assignee = currentUser() or reporter = currentUser()) and updated >= -14d and (status in (Done, Closed, closure, "Ready to Test") or comment ~ currentUser()) ORDER BY key DESC

Created during last month

created >= -30d AND assignee = currentUser() ORDER BY created DESC

@akochepasov
akochepasov / deb_commands.txt
Created February 13, 2025 16:59
debian packages
dpkg-deb -R the_package.deb tmp
apt install the_package.deb
apt remove the_package.deb
@akochepasov
akochepasov / cmake.sh
Created November 21, 2024 18:41
cmake common command lines
# Configure
cmake -Bbuild/release -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja -S.
# Build
cmake --build build/release --target program_exe
# Test
ctest --verbose --test-dir build/release/
@akochepasov
akochepasov / chrono.cpp
Created November 21, 2024 18:39
Working with c++ std::chrono
#include <cstdlib>
#include <iostream>
#include <chrono>
using std::chrono::steady_clock;
using std::chrono::system_clock;
constexpr inline std::chrono::seconds timeout1 =
std::chrono::seconds(60 * 60);
constexpr inline std::chrono::minutes timeout2 =
@akochepasov
akochepasov / docker_commands.md
Last active February 26, 2025 18:37
Docker commands

List docker containers running

docker ps docker container ls # same

Attach to a working container (Name555 is NAME)

docker exec -it Name555 bash

Create a docker image

docker build -t Tag123:v2 . # Uses local Dockerfile docker build -f Dockerfile22 -t Tag123:v2 .

@akochepasov
akochepasov / perf_flamegraph.txt
Last active May 22, 2024 05:15
Run perf, make flamegraph
# https://www.brendangregg.com/perf.html
/usr/local/bin/perf record -g -e cpu-clock -F 99 <bin_file>
/usr/local/bin/perf script | stackcollapse-perf.pl | flamegraph.pl > mm_flame.svg