๋ง๊ฐ์ง ๋์
๋ง๊ฐ์ง์ ํฅ ๋์์ ํ ๋ฒ์ฉ ์ฐ์ตํ ์ฌ๋์ด ๋๋ ค์ด ๊ฒ ์๋๋ผ ํ๊ฐ์ง์ ๋์์ ๋ง ๋ฒ ์ฐ์ตํ ์ฌ๋์ด ๋๋ ต๋ค - ์ด์๋ฃก (Bruce Lee)
๋ง๊ฐ์ง์ ํฅ ๋์์ ํ ๋ฒ์ฉ ์ฐ์ตํ ์ฌ๋์ด ๋๋ ค์ด ๊ฒ ์๋๋ผ ํ๊ฐ์ง์ ๋์์ ๋ง ๋ฒ ์ฐ์ตํ ์ฌ๋์ด ๋๋ ต๋ค - ์ด์๋ฃก (Bruce Lee)
Install $ sudo apt install rclone $ rclone --help $ rclone config n/s/q> n name> gdrive # rclone ์ฌ์ฉ์ ์๊ฒฉ์ง ๋๋ผ์ด๋ธ ์ด๋ฆ์ผ๋ก ์ฌ์ฉ Storage> 13 # google client_id> Enter client_secret> Enter scope> 1 root_folder_id> Enter service_account_file> Enter Edit advanced config?> n Use auto config? n # ์ถ๋ ฅ๋ url์ ๋ณต์ฌํ์ฌ ๋ธ๋ผ์ฐ์ ์ ์ ๋ ฅํ๊ณ ์น๋ฝํ๊ธฐ # ์น๋ฝํ ํ ๋ฐ์ key๋ฅผ ๋ณต์ฌ Enter verification code> key์ ๋ ฅ Configure this as a team drive? n y) Yes this is OK (default) y q # ๋๋ด๊ธฐ Usage ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ: ์ธ์ธํ ์ต์ ์ด ๋ง์ง๋ง ํ๋ฆ์ ์์ง ๋ง์. ํ์ํ๋ฉด ๊ด๋ จ ๋ฌธ์ ์ฐธ์กฐ. $ rclone ls gdrive: # list google drive files only $ rclone lsl gdrive: # list -l google drive files only $ rclone lsd gdrive: # list google drive folders $ rclone copy file1 gdrive: # copy file1 to gdrive: $ rclone copy dir1 gdrive: # copy dir1/* to gdirve: # ๋๋ ํ ๋ฆฌ๋ด ํ์ผ๋ณต์ฌ $ rclone copy dir1 gdrive:dir1 # copy dir1 to gdirve:dir1 # dir1 ๋๋ ํ ๋ฆฌ๋ณต์ฌ $ rclone delete gdrive:file1 # remove gdrive:file1 $ rclone delete gdrive:dir1 # remove gdrive:dir1 $ mkdir ~/gdrive $ rclone sync gdrive: ~/gdrive/ # sync google drive to local ~/gdrive $ rclone sync ~/gdrive gdrive: # sync ~/gdrive to google drive $ rclone sync -i ~/gdrive gdirve: # interactive mode $ rclone sync -P ~/gdrive gdirve: # view real-time transfer statistics $ rclone bisync ~/gdrive gdirve: # bidirectional sync between two paths # new, Newer, and Deleted files Mount $ rclone mount gdrive: ~/google-drive & $ ls ~/google-drive Crypt - ์ํธํ gdrive: ๋ด์ ํน์ ํด๋๋ฅผ ์ํธํํด์ gdrive๋ด์์๋ ๋ด์ฉ์ ๋ณผ ์ ์๊ณ ์ค์ง local์์๋ง ๊ฐ๋ฅํ๋ค. ๊ฐ์ธ์ ๋ณด๋ฅผ ๋ณด๋ค ์์ ํ๊ฒ ๋ณด๊ดํ ์ ์๋ ๋ฐฉ๋ฒ์ด๋ค. ...
INSTALL install - ์ค์น ํ ~/.bashrc์ ~/.cargo ์๋ ํ๊ฒฝ ์ค์ $ curl https://sh.rustup.rs -sSf | sh -- --help rustup ์ ๋ฐ์ดํธ/ ์ ๊ฑฐ $ rustup update $ rustup self uninstall rustc ์ปดํ์ผ๋ฌ ๋ฒ์ ํ์ธ $ rustc --version Hello World $ vim hello_world.rs fn main() { #println!๋ ํจ์๊ฐ ์๋ ๋งคํฌ๋ก println!("Hello, world!"); } $ rustc hello_world.rs Cargo๋ฅผ ํตํ ๊ฐ๋ฐ $ cargo new hello_cargo --bin $ cd hello_cargo $ vim src/main.rs fn main() { println!("Hello, world!"); } ./target/debug/hello_cargo ๋ก ๋ฐ์ด๋๋ฆฌ ์์ฑ $ cargo run # compile and run $ cargo run # run only: source is not changed $ cargo check # compile only no exe file create (rapid compile and test) $ cargo clean # cleanup all object and binary files $ cargo run -- --help #์คํํ์ผ ์ธ์๋ฅผ ๋ฐ์์ ์คํํ ๋ $ cargo build $ cargo build --release (optimize for release) ๋ชจ๋์ ์ฌ์ฉํ ๊ฒฝ์ฐ $ cargo add ansi_term #์๋์ผ๋ก Cargo.toml์ ๋ชจ๋์ด๋ฆ๊ณผ ๋ฒ์ ์ด ๋ฑ๋ก๋๋ค. $ vim src/main.rs #use ansi_term::xxxx ์ ๋ฃ๊ณ ์ฝ๋ฉ $ cargo run Build From Git $ git clone someurl.com/someproject $ cd someproject $ cargo build reference ์ ์ผ ๊ถ๊ธํ ๊ฒ์ ์ ์ฒด์ ์ธ ๊ฐ๋ฐ ๋ฐ ๋ฐฐํฌ ๊ณผ์ ์ธ๋ฐ ์๋๊ฐ ์์ฃผ ์ข์ https://free-strings.blogspot.com/2017/03/cargo-cargo.html https://rust-cli.github.io/book/tutorial/packaging.html ์์ฃผ ํ๋ฅญํ ์ฟก๋ถ์ด๋ค. ๋จผ์ ๊ธฐ๋ณธ ์จ๋ผ์ธ๋ถ์ ๋ณด๊ณ ์ ์ด๊ฒ์ ๊ณต๋ถํ์. https://rust-lang-nursery.github.io/rust-cookbook/
Intro debug > release ์์ผ๋ก ์์ฒญ๋ ๋ฐ์ด๋๋ฆฌ ์ฌ์ด์ฆ๋ฅผ ์๋ํ๋ค. ์ฐ์ ๊ฐ๋ฐ๊ณผ ๋๋ฒ๊น ์ ๋ณํํ ํ์ ์ต์ข ๋ฆด๋ฆฌ์ฆ์์ ์ ์ฉํ๋ค. ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ๋ค. Howto Cargo.toml์ ๋ค์์ ์ถ๊ฐํ๋ค. [profile.release] lto = true codegen-units = 1 opt-level = "z" panic = 'abort' build cargo build --release reference https://www.collabora.com/news-and-blog/blog/2020/04/28/reducing-size-rust-gstreamer-plugin/ https://github.com/johnthagen/min-sized-rust
last updated: {{ โ1736305941โ | date: โ%Y-%m-%d %H:%Mโ }} Intro ํจ์๋ค์ด ์ฒ์ ์คํ ๋ ๋ ํ์์ ์ํด ์ปดํ์ผ๋๋ค. ์ด๊ฒ์ ์ดํ๋ฆฌ์ผ์ด์ ์ด ๋น ๋ฅด๊ฒ ์์๋๋ ๊ฒ๊ณผ ๋ถํ์ํ ์์ ์ ๋ฐ์์ํค์ง ์๋ ๊ฒ์ ๋ณด์ฅํด ์ค๋ค. LuaJit์ neovim์ ๊ธฐ๋ณธ ํ์ฌ๋์ด ์๋ค. python, ruby ๋ฑ์ Jit๋ณด๋ค ์ฐ์ํ ์ฑ๋ฅ์ ๋ณด์ฌ์ค๋ค. LuaJit์ FFI(Foreign Function Interface)๋ Low-Level C์ธ์ด ํจ์๋ค์ ๋ณ๋ค๋ฅธ ์์ ์์ด ์ง์ ์ ์ผ๋ก ์ฌ์ฉํ ์ ์๋ค. ๋ค์ดํฐ๋ธ์ ๊ฒฌ์ค๋งํผ ์๋๊ฐ ๋น ๋ฅด๊ณ , ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋์ด ๋งค์ฐ ์ ๋ค. nginx์ LuaJIT์ ํฌํจ์์ผ์ ์ปค์คํฐ๋ง์ด์ง์ ํ OpenResty ์น ์๋ฒ๋ ์๋ค. ...