Skip to content

Instantly share code, notes, and snippets.

View kbegiedza's full-sized avatar
🐺

Krzysztof Begiedza kbegiedza

🐺
View GitHub Profile
root = false
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
max_line_length = 120
.component.title-row {
margin-bottom: 2rem;
}
.ribbon-container.component {
padding-top: 1rem;
padding-bottom: 0.75rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
border-radius: 1rem;
`docker run --rm oguzpastirmaci/gpu-burn <test duration>`
`sudo apt install stress`
`stress --cpu 8 --io 4 --vm 4 --vm-bytes 1024M --timeout 10s`

How to fix snap?

It's simple, just run:
sudo rm -rf /var/cache/snapd/
sudo apt autoremove --purge snapd gnome-software-plugin-snap
rm -fr ~/snap

Then make sure that it will be fixed forever with:
sudo apt-mark hold snapd

@kbegiedza
kbegiedza / private_fork.md
Created July 20, 2021 13:10 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

The Skills Poor Programmers Lack

A friend and I had a discussion about the basic skills that are often lacking in experienced programmers. How can a programmer work for ten or twenty years and never learn to write good code? So often they need close supervision to ensure they go down the right path, and they can never be trusted to take technical leadership on larger tasks. It seems they are just good enough to get by in their job, but they never become effective.

We thought about our experiences and came up with three fundamental skills that we find are most often missing. Note that these are not skills which take a considerable amount of talent or unique insight. Nor are they "trends" or "frameworks" to help you get a new job. They are basic fundamentals which are prerequisites to being a successful programmer.

Understand how the language works

Programmers cannot write good code unless they understand what they are typing. At the most basic level, this means they need to understand the rules of

@kbegiedza
kbegiedza / Shortest_path_for_friend.cpp
Last active May 20, 2019 18:30
Dijkstra shortest path
double Graph::shortest_path(unsigned int src, unsigned int dest)
{
std::vector<bool> visited(capacity_, false);
std::vector<double> distance(capacity_, std::numeric_limits<double>::max());
auto cmp = [&distance](unsigned int& l, unsigned int& r) -> bool { return (distance[l] > distance[r]); };
std::priority_queue<unsigned int, std::vector<unsigned int>, decltype(cmp)> q (cmp);
q.push(src);
distance[src] = 0;