Skip to content

Instantly share code, notes, and snippets.

View Quaker762's full-sized avatar
😛
Enjoying your stay?

Jesse Quaker762

😛
Enjoying your stay?
  • Palm Studios
  • My Computer
View GitHub Profile
@Quaker762
Quaker762 / glprogram.cpp
Created February 6, 2018 12:33
Fucking gcc template bug...
......
// HACK HACK: g++ 7.1 will NOT compile the following template
// without the bracketed namespaces.
//
// Refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace erpg{namespace gl{
template<>
void Program::SetUniform<int>(const std::string& name, int value)
{
@Quaker762
Quaker762 / Canvas-Mark-All-As-Read.user.js
Created April 20, 2018 11:46 — forked from CSymes/Canvas-Mark-All-As-Read.user.js
I got sick of having to slowly scroll down discussions on Canvas, so made a userscript to mark all unread posts as read for me. Adds a button to the header on each discussion page.
// ==UserScript==
// @name Canvas 'Mark All as Read'
// @namespace com.plasticsquid.canvas.read
// @version 1.0
// @description Adds a button to allow marking of all posts as read in a Canvas discussion
// @author Cary Symes
// @match https://*.instructure.com/courses/*/discussion_topics/*
// @grant none
// ==/UserScript==
/** @file
*
* Implementation of R2A03.hpp
*
* @copyright 2018 Euclidean Entertainment
*
* @date 18-4-2018
*
* @author Jesse Buhagiar
*/
/**
* Copyright (c) 2018 Euclidean Entertainment
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
#!/bin/bash
set -e # If theres ANY issue with any part of the build, it will halt immediately
echo What target are we building for?
read PLATFORM_TARGET
# Now, export all the variables we'll need
export TARGET=$PLATFORM_TARGET
export HOST=x86_64-w64-mingw32
@Quaker762
Quaker762 / mp3.c
Created April 4, 2019 08:08
MP3 (MPEG1) bitrate detector
/**
* MP3 bitrate and frequency finder
*
* Reads an MP3 file header and obtains the bitrate and frequency from
* bits 17-22 (byte 3).
*
* Author: Jesse Buhagiar [quaker762] jesse.buhagiar@student.rmit.edu.au
*/
#include <stdio.h>
#include <stdint.h>
@Quaker762
Quaker762 / main.c
Created August 30, 2019 14:02
oh nonononono
/**
* COSC1114 Memory Allocator
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdint.h>
@Quaker762
Quaker762 / pata.cpp
Created October 30, 2019 11:33
Add me to PATAChannel::initialize under PCI::enumerate all
if(m_pci_address.is_null()) {
kprintf("Panic: Unable to find value IDE controller!\n");
hang();
}
void SerenitySDLWidget::keydown_event(GKeyEvent& event)
{
dbgprintf("keydown_event: key = %d\n", event.key());
SDL_Event sdl_event;
sdl_event.type = SDL_KEYDOWN;
sdl_event.key.keysym.sym = conversion_map[event.key()];
SDL_PushEvent(&sdl_event);
}
<quake> <(null)>
Process: New process PID=17 with name=Shell
Thread{0x003731d0}: New thread TID=0 in Shell(17)
Closing fds in shell process:
Now we gotta wait on children:
21774128
sys$waitpid(17, 0x014c3e38, 6)
/dev/pts/0 set_termios: ECHO=true, ISIG=true, ICANON=true, ECHOE=false, ECHOK=false, ECHONL=false, ISTRIP=false, ICRNL=false, INLCR=false, IGNCR=false
Shell(17) do_exec(quake): thread_count() = 1
Shell(17) do_exec(/bin/quake): thread_count() = 1