Skip to content

Instantly share code, notes, and snippets.

View FerdinaKusumah's full-sized avatar
🧑‍🚀
✌🏻

Ferdina Kusumah FerdinaKusumah

🧑‍🚀
✌🏻
View GitHub Profile
@FerdinaKusumah
FerdinaKusumah / main.go
Last active April 9, 2022 12:43
grpc main.go
package main
import (
"context"
"fmt"
coreProto "golang/simple-grpc/proto"
"google.golang.org/grpc"
"log"
"net"
)
@FerdinaKusumah
FerdinaKusumah / hello.proto
Created April 5, 2022 13:55
hello protobuff
syntax = "proto3";
option go_package = "proto/hello.proto;hello_proto";
package proto;
service HelloService {
rpc SayHello(HelloRequest) returns (HelloResponse) {}
}

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
class Student:
name: str = "foo"
hobby: str = "bar"
def __init__(self, age: int = 0):
self.age = age
@property
def get_name(self):
return self.name
@FerdinaKusumah
FerdinaKusumah / dynamic_attribute_class.py
Created October 5, 2021 12:47
Assign Dynamic Attribute Class
class Student:
name: str = "foo"
hobby: str = "bar"
def __init__(self, age: int = 0):
self.age = age
@property
def get_name(self):
return self.name
@FerdinaKusumah
FerdinaKusumah / dynamic_assign_value.py
Last active October 5, 2021 12:45
Manual Assign Attributes Values
class Student:
name: str = "foo"
hobby: str = "bar"
def __init__(self, age: int = 0):
self.age = age
@property
def get_name(self):
return self.name
@FerdinaKusumah
FerdinaKusumah / dynamic_attributes_class.py
Created October 5, 2021 06:48
Dynamic attributes class
class Student:
name: str = "foo"
hobby: str = "bar"
def __init__(self, age: int = 0):
self.age = age
@property
def get_name(self):
return self.name
@FerdinaKusumah
FerdinaKusumah / simple_class.py
Created October 5, 2021 06:41
Simple Python Class
class Student:
name: str = "foo"
hobby: str = "bar"
def __init__(self, age: int = 0):
self.age = age
@property
def get_name(self):
return self.name
@FerdinaKusumah
FerdinaKusumah / class_attr_as_instance_attr.py
Created October 4, 2021 08:33
Class Attributes as Instance Attributes
class FooBar:
class_attr: str = "foo bar"
def __init__(self, instance_attr: str):
self.instance_attr = instance_attr
if __name__ == "__main__":
class FooBar:
class_attr: str = "foo bar"
def __init__(self, instance_attr: str):
self.instance_attr = instance_attr
if __name__ == "__main__":