Skip to content

Instantly share code, notes, and snippets.

@yspkm
yspkm / dind_k3s_rancher.yaml
Last active August 15, 2023 08:46
doker in docker
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '3'
generation: 3
labels:
workload.user.cattle.io/workloadselector: apps.deployment-default-docker
managedFields:
- apiVersion: apps/v1
@yspkm
yspkm / init.sh
Last active October 30, 2023 14:31
New way to install node
# Installation Instructions Node.js
# If you're root, you could just ommit the sudo
#!/bin/bash
# Download and import the Nodesource GPG key
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
#Create deb repository
NODE_MAJOR=20
@yspkm
yspkm / how-to-install-pdflatex-ubuntu.md
Created October 1, 2023 03:16
How to install pdflatex (ubuntu 22.04)

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@yspkm
yspkm / bitFilter.c
Last active October 21, 2023 09:09
Bit Filter Tricks
// 32bit 기준
int bitFilter(int x, int highbit, int lowbit) {
int mask;
mask = 1 << highbit;
mask = mask | (mask >> 1);
mask = mask | (mask >> 2);
mask = mask | (mask >> 4);
mask = mask | (mask >> 8);
mask = mask | (mask >> 16);
@yspkm
yspkm / init.vim
Last active October 24, 2023 17:38
wget https://golang.org/dl/go1.21.3.linux-amd64.tar.gz
sudo tar -xvf go1.21.3.linux-amd64.tar.gz
sudo mv go ~/
# .profile
export GOROOT=$HOME/go
export GOPATH=$HOME/workplace/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
# ~/.cofing/nvim/autoload
@yspkm
yspkm / How to change qemu.conf.md
Created October 23, 2023 03:31
How to use QEMU GUI (virt-manager)

How to Configure Access for qcow2 in virt-manager

If you've created a qcow2 virtual disk, you might have noticed that it's not internally accessible even when you access it using sudo virt-manager. To fix this, we need to make a few changes to the /etc/libvirt/qemu.conf file.

1. Locate the Configuration File: The configuration file is found at /etc/libvirt/qemu.conf.

2. Modify the User and Group Settings: Find the lines that specify the user and group for QEMU processes. The default settings look like:

@yspkm
yspkm / NVIDIA Driver, CUDA, and cuDNN Installation Guide for Ubuntu22.04.md
Last active May 2, 2024 08:04
How to use CUDA in Ubuntu (with torch, cupy, cudnn.h + )

NVIDIA Setup Guide: Driver, CUDA, cuDNN & Data Libraries on Ubuntu 22.04

This guide will walk you through the process of setting up NVIDIA drivers, CUDA, cuDNN, and some popular data science libraries on Ubuntu 22.04.

Before You Begin

  • Ensure you have administrative privileges on your computer.
  • Make sure you are connected to the internet.

Installation Steps

@yspkm
yspkm / Ubuntu Zoom Guide.md
Created October 23, 2023 07:21
우분투 Zoom 설치

Installing Zoom Using Terminal

  1. Download the Zoom DEB installation file:

    wget https://zoom.us/client/5.16.2.8828/zoom_amd64.deb
  2. Install Zoom using the downloaded DEB file:

sudo apt install ./zoom_amd64.deb -y

@yspkm
yspkm / init.sh
Created November 10, 2023 04:50
Dot 파일 컴파일
# 설치 방법
snap install graphviz
# 그래프 이미지 생성 방법
dot -Tpng -Gdpi=300 <dot 파일명> -o <이미지 파일명> # png
dot -Tjpg -Gdpi=300 <dot 파일명> -o <이미지 파일명> # jpg
dot -Tsvg <dot 파일명> -o <이미지 파일명> # svg
@yspkm
yspkm / init.sh
Created November 18, 2023 15:04
Docker사용 시 시작 스크립트
#!/bin/bash
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources: