Skip to content

Instantly share code, notes, and snippets.

View Mluckydwyer's full-sized avatar
🎉

Matthew Dwyer Mluckydwyer

🎉
View GitHub Profile
@Mluckydwyer
Mluckydwyer / opengl-in-wsl.md
Last active May 22, 2024 12:58
Install OpenGL on Ubuntu in WSL

How to Install OpenGL in Ubuntu in WSL2

These steps have been tested on Windows 10 with WSL2 running Ubuntu.

1. Dependencies

First install the dependencies:

apt install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev

There are more than we need, but also include GLut and Glu libraries to link aginst during compilation for application development (these can be removed if that functionality is not required).

@Mluckydwyer
Mluckydwyer / HashTable.c
Created January 12, 2020 20:05
A Hash Table implementation in C
//
// Created by mluck on 10/18/2018.
//
#include "vector.c" // Vector implmentation required (https://gist.github.com/Mluckydwyer/5c8d93d42df8be3089570616c1182e72)
const int DEFAULT_CAPACITY = 10;
// Hashtable struct typedef
typedef struct hashTable_t{
int size;
@Mluckydwyer
Mluckydwyer / Vector.c
Last active May 14, 2020 18:41
Auto-Scaling Vector in C
// Header File
#ifndef VECTOR_H_
#define VECTOR_H_
// Vector Struct with size and allocated values
typedef struct vector_t{
int size;
int allocated;
int increment;
void** data;
@Mluckydwyer
Mluckydwyer / CreateVideoItems.js
Last active January 12, 2020 20:06
Add video list items to a div from Youtube API call
function setList(vids) {
for (var i = 0; i < vids.items.length; i++) {
var vid = vids.items[i];
var image = document.createElement("img");
image.setAttribute('class', 'video-image');
image.setAttribute('src', vid.snippet.thumbnails.medium.url);
var title = document.createElement("a");
title.setAttribute('class', 'video-title');
@Mluckydwyer
Mluckydwyer / School_.idea_School.iml
Last active January 12, 2020 20:08
Youtube Playlist Tool that displays Youtube playlist information based on Youtube API calls
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>