Skip to content

Instantly share code, notes, and snippets.

View iddev5's full-sized avatar
Making some projects...

Ayush iddev5

Making some projects...
View GitHub Profile
@iddev5
iddev5 / Swizzle.zig
Last active September 14, 2021 08:52
Example of vector swizzling in Zig
const std = @import("std");
const Vec2 = struct {
x: f32,
y: f32,
};
const Vec3 = struct {
x: f32,
y: f32,
@iddev5
iddev5 / basic_wasm.zig
Created May 25, 2022 13:35
Basic test for wasm
const std = @import("std");
const mach = @import("mach");
const gpu = @import("gpu");
const App = @This();
timer: mach.Timer = undefined,
pub fn init(app: *App, _: *mach.Engine) !void {
app.timer = try mach.Timer.start();
const std = @import("std");
const mach = @import("mach");
const js = @import("js-runtime");
pub const App = @This();
audio_ctx: js.Object,
pub fn init(app: *App, _: *mach.Core) !void {
const audio_ctx = js.constructType("AudioContext", &.{});
@iddev5
iddev5 / numconv.c
Created August 6, 2024 12:36
Any -> Any base simple number converter (interactive)
#include <stdio.h>
#include <string.h>
#include <ctype.h>
void dec2base(int dec, int base, char *res) {
int i = 0;
while (dec > 0) {
int rem = dec % base;
if (rem > 9)
res[i] = 'A' + (rem - 10);
@iddev5
iddev5 / lqcq.cpp
Created September 12, 2024 14:21
Linear and circular queue
#include <iostream>
using namespace std;
class LinearQueue {
int *data;
int front;
int rear;
int size;
public:
- Welcome, introduction
- about the program, about attendence and tasks
- feel free to ask questions
- What do you mean by entrpreneurship/what comes to mind?
=> Entrepreneurship is the process of identifying a problem, creating a solution, and bringing that solution to life as a product, service, or venture
- what do you mean by entrepreneur?