Skip to content

Instantly share code, notes, and snippets.

@shoark7
shoark7 / algorithm-sites.md
Last active April 27, 2024 16:31
개인적으로 사용했던 알고리즘 사이트들을 추천드립니다.

알고리즘이라고 많이 들어보셨을 겁니다. 알고리즘은 교과서식으로 정의해보면 '문제를 해결하는 일련의 절차'라고 할 수 있는데요. 컴퓨터로 어떤 문제를 해결해야 할 때, 코딩으로 어떻게 해결할지에 대한 구체적인 방법을 이야기합니다.

예를 들어, 숫자 배열을 정렬하는 문제가 있다고 합시다. 인간이 배열을 대충 보고 정렬하기는 쉽지만 원소의 개수가 수백만개에 달하는 배열에서 컴퓨터에게 일을 시켜서 컴퓨터가 정렬하게 하는 것은 쉽지 않습니다. 실제로 정렬은 알고리즘에서 매우 유명하고 기초적인 분야로 정렬을 하는 방법, 즉 알고리즘이 지금까지 알려진 것만 해도 수십가지가 됩니다.

알고리즘을 공부하는 것은 꽤 도움이 되는데요. 일단 코딩을 시작하시는 분들 입장에서는 코딩을 하게 되서 코딩과 문법에 익숙해지는 장점이 있고, 또 개발자적 사고를 하는 데 알고리즘 문제를 푸는 것이 도움이 됩니다. 어떤 개발 회사들은 알고리즘 능력을 테스트하기 때문에 취업을 목표로 공부하신다면 손해는 보지 않습니다.

저는 알고리즘을 좋아해서 조금씩 풀어왔는데요. 알고리즘을 풀 수 있도록 문제를 내주는 사이트들이 정말 많습니다. 오늘은 그중에서 몇 가지만 소개해드리겠습니다. 사이트는 정말 많은데요, 그중에서 제가 최소 몇 번이라도 써본 사이트들만 소개하겠습니다. 더 좋은 사이트들이 있으면 소개해주시면 추가할 수 있을 것 같습니다.


@alexander-danilenko
alexander-danilenko / windows-11-cheatsheet.md
Last active April 27, 2024 16:30
Windows 11 Cheatsheet
@Strus
Strus / clangd.md
Last active April 27, 2024 16:29
How to use clangd C/C++ LSP in any project

How to use clangd C/C++ LSP in any project

tl;dr: If you want to just know the method, skip to How to section

Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the only way to painlessly generate it is to use CMake.

But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.

Method summary

Basically what we need to achieve is to create a CMake file that will generate a compile_commands.json file with information about:

@mwufi
mwufi / install_docker_in_colab.sh
Last active April 27, 2024 16:29
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@aidos-dev
aidos-dev / README.md
Last active April 27, 2024 16:27
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@gurustron
gurustron / IoC.cs
Last active April 27, 2024 16:25
Autofac keyed registration with Func<> factory resolve
var builder = new ContainerBuilder();
builder.RegisterType<ImplOne>()
.Keyed<IDependency>(MyTypeEnum.TypeOne)
.SingleInstance();
builder.RegisterType<ImplTwo>()
.Keyed<IDependency>(MyTypeEnum.TypeTwo)
.SingleInstance();
@ddieppa
ddieppa / InstallChocolateyPackages.ps1
Last active April 27, 2024 16:24
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 16:26
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@r15ch13
r15ch13 / iommu.sh
Last active April 27, 2024 16:23
List IOMMU Groups and the connected USB Devices
#!/usr/bin/env bash
shopt -s nullglob
lastgroup=""
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
for d in $g/devices/*; do
if [ "${g##*/}" != "$lastgroup" ]; then
echo -en "Group ${g##*/}:\t"
else
echo -en "\t\t"
@sarlinpe
sarlinpe / viewer.py
Created February 28, 2022 07:59
Open3D COLMAP viewer
import os
from collections import defaultdict
from copy import deepcopy
import numpy as np
from matplotlib import cm
import open3d as o3d
import open3d.visualization as vis
import pycolmap
print(o3d.__version__)