Skip to content

Instantly share code, notes, and snippets.

View Shaun289's full-sized avatar

Sunjong Park Shaun289

View GitHub Profile
@Shaun289
Shaun289 / ubuntu_22_04_lock_logout_shortcuts.md
Created November 22, 2024 04:26
Ubuntu 22.04 screen lock, logout shortcuts
@Shaun289
Shaun289 / open_ui_app_in_terminal.md
Created November 22, 2024 00:19
Open ui app in ubuntu 22.04 terminal

Open ui app in ubuntu terminal

  • xdg-open <app_name>
  • xdg-open <pdf_filename>
    • It works!
@Shaun289
Shaun289 / vscode_keybindings.md
Created November 22, 2024 00:09
vscode shortcut toggleMaximizedPanel only in terminal

vscode shortcut toggleMaximizedPanel only in terminal

  • ctrl+shift+x toggle maximize terminal only working in terminal
  • Open keyboard shortcuts(JSON)
    {
        "key": "ctrl+shift+x",
        "command": "workbench.action.toggleMaximizedPanel",
        "when": "terminal.active",
 },
@Shaun289
Shaun289 / vscode_apply_insert_snippet.md
Last active November 21, 2024 13:38
vscode apply insertSnippet

Make advanced vscode shortcut

    {
        "key": "cmd+shift+f7",
        "command": "editor.action.insertSnippet",
        "args": {
            "snippet": "<< \" ${TM_SELECTED_TEXT}:\" << ${TM_SELECTED_TEXT} "
 },
@Shaun289
Shaun289 / test_find.md
Last active November 21, 2024 04:37
test find in bash

Environment

$ cat /etc/issue
Ubuntu 22.04.5 LTS \n \l
$ echo $SHELL
/usr/bin/bash

find names including "gdb" only directory

  • I want to find names including "gdb" only directory.

Create directories and files to test

@Shaun289
Shaun289 / markdown_chrome.md
Created November 21, 2024 00:35
Read markdown files in chrome by extension

Read markdown files in chrome

install extension

  • Markdown Viewer 스크린샷 2024-11-21 09-29-54
  • Click Markdown Viewer 스크린샷 2024-11-21 09-31-33
  • Goto advanced option 스크린샷 2024-11-21 09-32-21
  • Set file access - Allow all
@Shaun289
Shaun289 / remove_installed_gtest.sh
Last active November 20, 2024 21:47
Remove the installed googletest
# I compiled and installed googletest-release-1.12.1 in my macos.
# I want to remove the installed files clearly.
# find install_manifest.txt
googletest-release-1.12.1 % ls
BUILD.bazel CMakeLists.txt CTestTestfile.cmake README.md ci googlemock lib
CMakeCache.txt CONTRIBUTING.md LICENSE WORKSPACE cmake_install.cmake googletest
CMakeFiles CONTRIBUTORS Makefile bin docs install_manifest.txt
# remove it
@Shaun289
Shaun289 / xargs_test.sh
Created November 20, 2024 21:37
Test xargs in macos
# Tested in macOS Sonoma 14.5
# Reference : https://johngrib.github.io/wiki/mac/terminal-guide/03/#-i-%EC%98%B5%EC%85%98%EA%B3%BC-placeholder
% echo $SHELL
/bin/zsh
% seq 10 | xargs -I {} echo {}
1
2
3
4
@Shaun289
Shaun289 / BasicOp.rs
Created July 15, 2023 07:27
opencv4cvml/ch03/BasicOp
/**
* original source : https://github.com/sunkyoo/opencv4cvml/blob/master/ch03/BasicOp/main.cpp
* Cargo.toml
*. opencv = "0.82.0"
*/
use opencv::core::*;
/* Point : https://docs.rs/opencv/0.83.0/opencv/core/struct.Point_.html
*/
fn point_op() {