Skip to content

Instantly share code, notes, and snippets.

View shk2000v's full-sized avatar
🏠
Working from home

SeungHwan Kim shk2000v

🏠
Working from home
View GitHub Profile
@shk2000v
shk2000v / rust_vartiable.rs
Created September 23, 2023 14:40
Rust variable binings
fn main() {
// Variable bindings
let a = true;
let b: bool = true;
let (x,y) = (1,2);
let mut z = 5; // fixable
z = 6;
@shk2000v
shk2000v / println_macro_example.rs
Created September 23, 2023 14:31
Usages of pinrlnt! macro from rust`
fn main() {
println!("{}, {}!", "Hello", "world"); // Hello, world!
println!("{0}, {1}!", "Hello", "world"); // Hello, world!
println!("{greeting}, {name}!", greeting="Hello", name="world"); // Hello, world!
println!("{:?}", [1,2,3]); // [1, 2, 3]
println!("{:#?}", [1,2,3]);
/*
[
1,
@shk2000v
shk2000v / navigationType.ts
Created May 28, 2023 08:42
How to write react navigation type
import { NativeStackScreenProps } from '@react-navigation/native-stack';
type StartStackParamList = {
Start: undefined;
Home: undefined;
// .. something
};
type OtherStackParamList = {
OtherScreen: { other : string } | undefined;