This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <SDL2/SDL.h> | |
| /** | |
| * I finally find out how this SDL should work on my machine. | |
| * In the past, I just so dumb to not initialize its renderer. | |
| * | |
| * On this case, I create renderer and let it render the black screen with `SDL_SetRenderDrawColor`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| typedef struct { | |
| int x; | |
| int y; | |
| } Vector2; | |
| /** | |
| * This is purely math, we also can apply this into 3 dimensional vector. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author https://github.com/KennFatt | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| /** | |
| * I've been do some research about C data type. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SDL2/SDL.h> | |
| #include <stdio.h> | |
| #include "unittest.h" | |
| #include "src/statemanager.h" | |
| #include "src/graphics.h" | |
| unsigned int onInit(void *state) | |
| { | |
| ce_State *P_state = (ce_State *) state; | |
| fprintf(stderr, "[%p] Initialized...\n", (void *) P_state); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function runkt() { | |
| local kt_compiler=kotlinc | |
| local c_params=$# | |
| if [[ $c_params == 0 ]]; then | |
| echo "[Run-KT] No parameters given!" | |
| return | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step to install Arch Linux: | |
| 1. Connect to the internet! | |
| $ wifi-menu | |
| 2. Check if you are already connected to the internet. | |
| $ ip addr show | |
| $ ping www.google.com | |
| 3. Choose the right drive to install. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # ~/.bash_aliases | |
| # | |
| ## List of all my aliases. | |
| # Supress systemctl as sudo. | |
| alias systemctl='sudo systemctl' | |
| # Common macros. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Leap year identifier. | |
| * @author https://github.com/KennFatt | |
| * | |
| * KennFatt - 2019 | |
| */ | |
| #include <stdio.h> | |
| _Bool isLeapYear(int); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| use Closure; | |
| class Router { | |
| public function __construct() { | |
| new class ($this, $_SERVER['REQUEST_URI'], function(string $msg) : string { | |
| $len = strlen($msg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Algorithm by: Ferry Boender | |
| * Source: https://www.electricmonk.nl/docs/dependency_resolving_algorithm/dependency_resolving_algorithm.html | |
| */ | |
| declare(strict_types=1); | |
| class Node { |