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
| PROJECT = | |
| CC = gcc | |
| CFLAGS = | |
| LIBS = | |
| BUILD_DIR = build | |
| OBJ_DIR = $(BUILD_DIR)/obj | |
| BIN = $(BUILD_DIR)/$(PROJECT) |
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
| // REQUIRES C11> | |
| #include <stdalign.h> | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #define ALIGN_SIZE_OF(name, x) \ | |
| (printf("%s => Alignof: %ld // Sizeof: %ld\n", name, alignof(x), sizeof(x))) | |
| #define MEMBER_ADDRESS(member, parent) \ |
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
| """ | |
| References: | |
| - https://developers.google.com/identity/protocols/oauth2/web-server | |
| - https://developers.google.com/drive/api/reference/rest/v3 | |
| - https://stackoverflow.com/questions/10827920/not-receiving-google-oauth-refresh-token | |
| - https://www.youtube.com/watch?v=9HHd3IWI5Jg | |
| 1 - curl -L \ | |
| --data "access_type=offline" \ | |
| --data "client_id=" \ |
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
| let gData; | |
| function fetchData() { | |
| fetch("https://date.nager.at/api/v3/PublicHolidays/2024/BR") | |
| .then((r) => r.json()) | |
| .then((result) => { | |
| gData = result; | |
| processData(); | |
| }) | |
| .catch((e) => console.log("Error fetching data:", e)); |
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
| -- General LunarVim configs | |
| lvim.log.level = "warn" | |
| lvim.format_on_save = true | |
| lvim.colorscheme = "nightfly" | |
| -- lvim.transparent_window = true | |
| -- VIM Options | |
| vim.opt.shiftwidth = 2 | |
| vim.opt.tabstop = 2 | |
| vim.opt.relativenumber = true |
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
| # If on MacOS, make sure that you're using openssl and not libressl, which is the | |
| # default installed with MacOS. | |
| # If using LibreSSL: | |
| # | |
| # brew install openssl | |
| # echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc # instead of .zshrc, | |
| # # use the respective | |
| # # to your shell session. | |
| PRIVATE_KEY_OUTPUT=private_key.pem |
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
| boardrev=0x1101 | |
| sromrev=11 | |
| boardtype=0x073e | |
| vendid=0x14e4 | |
| devid=0x43ba | |
| macaddr=00:90:4c:0d:f4:3e | |
| ccode=0 |
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
| use wgpu; | |
| use winit; | |
| const WINDOW_TITLE: &str = "Window"; | |
| const WINDOW_SIZE: (u32, u32) = (1280, 720); | |
| #[async_std::main] | |
| async fn main() { | |
| // Window Stuff ================================================================================ | |
| let event_loop = winit::event_loop::EventLoop::new(); |
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
| use winit; | |
| const WINDOW_TITLE: &str = "Window"; | |
| const WINDOW_SIZE: (u32, u32) = (1280, 720); | |
| fn main() { | |
| let event_loop = winit::event_loop::EventLoop::new(); | |
| let _w_builder = winit::window::WindowBuilder::new() | |
| .with_title(WINDOW_TITLE) | |
| .with_inner_size(winit::dpi::PhysicalSize::new(WINDOW_SIZE.0, WINDOW_SIZE.1)) |
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
| -- THIS CODE IS NOT MINE! I got it from https://github.com/tsoding/haskell-music which | |
| -- has an awesome youtube channel about haskell and functional programming, please check his content! | |
| -- This is here just for learning purposes! | |
| -- In order to make it run you'll need to have ffplay installed (usually downloaded alongside ffmpeg) | |
| import qualified Data.ByteString.Lazy as B | |
| import qualified Data.ByteString.Builder as B | |
| import Data.Foldable | |
| import Data.List | |
| import System.Process |
NewerOlder