Skip to content

Instantly share code, notes, and snippets.

@akochepasov
akochepasov / monitor_reset.sh
Created November 7, 2025 18:02
Ubuntu monitor reset
# 1
xrandr -s 0
# 2
dconf reset -f /
# 3
rm ~/.config/monitors.xml
@akochepasov
akochepasov / .gitconfig
Created October 18, 2025 19:54
git config
[user]
name = akochepasov
[credential]
helper = cache
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[core]
@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
Last active February 6, 2026 18:40
debian packages
## Extracts the contents of a the_package.deb package into tmp
dpkg-deb -R the_package.deb tmp
## Find a package for a file
dpkg -S /usr/bin/ssh
# Find a package dependencies
apt-cache depends openssh-client | grep libssl3
# Find all packages dependent on libssl3
@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 =