Skip to content

Instantly share code, notes, and snippets.

View junetech's full-sized avatar

Juntaek HONG junetech

  • Pohang, Korea
  • 05:11 (UTC +09:00)
View GitHub Profile
@junetech
junetech / iguanatex_on_w11.md
Last active June 17, 2024 00:52
IguanaTex on PowerPoint for Windows

IguanaTex on PowerPoint for Windows

  • IguanaTex v1.61
  • Windows 11
  • PowerPoint version 2405

Install requirements

@junetech
junetech / init_windows_11.md
Created June 5, 2024 07:20
새로 Windows 11 설치

새로 Windows 11 설치

설치전

기존 파일 백업

  • USB 메모리, 외장하드, 외장SSD, 혹은 대용량 클라우드 드라이브 준비
  • 파일 탐색기 왼쪽의 다음 항목을 백업:
    • 바탕 화면
  • 다운로드
@junetech
junetech / mamba_on_w11.md
Last active June 5, 2024 07:06
Mamba on Windows 11

Mamba on Windows 11

Package manager인 mamba를 Windows 11의 PowerShell에서 사용할 수 있도록 셋업하기

Why?

  • conda와 사용방법이 거의 동일
  • conda보다 빠르다
    • conda는 Python으로 구현되어있으나, mamba는 C++로 구현
  • 패키지 다운로드시 여러 파일 동시 다운로드
@junetech
junetech / main.py
Last active May 8, 2024 05:31
Python file boilerplate
LOG_FILENAME = "mylog.log"
LOG_ENCODING = "utf-8"
def main():
print("Hello world!")
if __name__ == "__main__":
import datetime
@junetech
junetech / nextcloud_on_fedora_38.md
Last active October 25, 2023 06:01
Nextcloud on Fedora Workstation 38

Nextcloud on Fedora Workstation 38

Initialization

  • Configuration of self generated SSL certificate
    • Append export ssl_name="my_domain_name" to ~/.bashrc
      • Replace "my_domain_name" with the domain name(e.g. lists.fedoraproject.org)
    • # dnf install openssl
    • # mkdir ~/certs
    • # cd ~/certs
@junetech
junetech / gist:b6b374ce5ca20c34feb18ad58399d027
Last active June 13, 2023 02:43 — forked from djsmith42/gist:3956189
Console output suppressor for Python code
"""http://thesmithfam.org/blog/2012/10/25/temporarily-suppress-console-output-in-python/
https://stackoverflow.com/questions/36956083/how-can-the-terminal-output-of-executables-run-by-python-functions-be-silenced-i
"""
import os
import sys
from contextlib import contextmanager
@contextmanager
def suppress_stdout():
@junetech
junetech / python.jsonc
Last active September 9, 2021 04:12
Python snippets
{
// Snippets for Python
"Private Member Getter": {
"prefix": [
"pmg",
"ㅔㅡㅎ"
],
"description": "Create private class member with getter",
"body": [
"__${1:Name}: ${2:Type}",
@junetech
junetech / silencer.py
Created March 5, 2021 01:35
Suppress console output of python codes & FFI
"""http://thesmithfam.org/blog/2012/10/25/temporarily-suppress-console-output-in-python/
https://stackoverflow.com/questions/36956083/how-can-the-terminal-output-of-executables-run-by-python-functions-be-silenced-i
"""
import sys
import os
import contextlib
print(f"package\t{__name__}\tloaded")
@junetech
junetech / fedora_server_init_settings.md
Last active March 4, 2021 02:04
Fedora Server initial settings

Initial settings for Fedora Server

based on version 33

Static IP address using CLI

  • Find interface name(e.g. enp42s0) by $ ifconfig -a
  • Make & edit the interface's config file by $ sudo nano /etc/sysconfig/network-scripts/ifcfg-enp42s0
    • put the informations by the following format:
@junetech
junetech / if_test.py
Created December 4, 2020 02:40
Python if statement test
def if_bool_value(any_input):
_str = f"For if statement, {any_input} of {type(any_input)} is"
if any_input:
print(_str, True)
else:
print(_str, False)
if_bool_value(1)
if_bool_value(2)