Skip to content
View matyo-17's full-sized avatar
🇲🇾
hello, world
🇲🇾
hello, world

Block or report matyo-17

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
matyo-17/README.md

matyo-17 GitHub last commit

class AboutMe {
    protected string $base = "malaysia";
    protected string $first_name = "Filson";
    protected string $last_name = "Teo";
    protected string $email = "filsonteo@gmail.com";
    protected string $description = "a software developer";
    protected string $website = "https://matyo-17.github.io/";
    protected string $linkedin = "https://www.linkedin.com/in/filson-teo-7a380a20b/";
    protected array $fav_programming_lang = ["php", "python", "javascript"];
    protected array $fields_interested = [
        "software development", "artificial intelligence", "machine learning",
        "robotics", "image processing",
    ];
    protected array $open_sources = [
        "https://github.com/matyo-17/mysql-backup",
        "https://github.com/matyo-17/docker-laravel-stack",
    ];

    public function introduce(): string {
        $string = "<p>Name: ".$this->get_name()."</p>";
        $string .= "<p>Overview: ".$this->description."</p>";
        $string .= "<p>Based in: ".ucfirst($this->base)."</p>";
        $string .= "<p>Website: ".$this->get_links("website")."</p>";
        $string .= "<p>LinkedIn: ".$this->get_links("linkedin")."</p>";
        $string .= "<p>Email: ".$this->email."</p>";
        $string .= "<p>Fields interested: ".$this->array_to_string("fields_interested", true)."</p>";
        $string .= "<p>Favourite programming language: ".$this->array_to_string("fav_programming_lang")."</p>";
        $string .= "<p>Open sources: ".$this->array_to_string("open_sources", true, true)."<p>";
        $string .= "<br>";
        $string .= "<p>This is a summary of me. Visit my website for more details.</p>";
        return $string;
    }

    private function get_name(): string {
        return $this->first_name." ".$this->last_name;
    }

    private function get_links(string $purpose): string {
        return "<a href='".$this->$purpose."'>".$this->$purpose."</a>";
    }

    private function array_to_string(string $var, bool $list=false, bool $links=false): string {
        $string = ($list) ? "<ul>" : "";
        foreach ($this->{$var} as $e) {
            $string .= ($list) ? "<li>" : "";
            $string .= ($links) ? "<a href='".$e."'>" : "";
            $string .= $e.((!$list) ? ", " : "");
            $string .= ($links) ? "</a>" : "";
            $string .= ($list) ? "</li>" : "";
        }
        return ($list) ? $string."</ul>" : substr($string, 0, -2);
    }
}

echo (new AboutMe())->introduce();

🔨 Language & Tools

Pinned Loading

  1. mysql-backup mysql-backup Public

    mysql backup cronjob

    Shell

  2. docker-laravel-stack docker-laravel-stack Public

    Dockerfile 1