Skip to content

Instantly share code, notes, and snippets.

@Mordo95
Mordo95 / MsiFileInfo.h
Created May 17, 2023 13:23
extract MSI properties in C++
#pragma once
#include <Windows.h>
#include <MsiQuery.h>
#include <string>
#include <sstream>
#include <map>
#include <exception>
#include <list>
#pragma comment(lib, "msi.lib")
@Mordo95
Mordo95 / Skillable.ts
Created December 1, 2022 14:23
A simple XP table / Leveling system in Typescript. Because why not. Most of the formulas have been sucked out of my thumb but work according to how I want it to
import XpTable from "./XpTable";
export default class Skillable {
protected _xp: number = 0;
get xp() {
return this._xp;
}
set xp(val) {
@Mordo95
Mordo95 / Program.cs
Created September 4, 2021 20:33
Multi-player keyboard binder
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Threading;
namespace InputStuffaaaaa
{
public interface IKeyBinding
@Mordo95
Mordo95 / keyboard_shortcuts.js
Last active August 19, 2021 00:11
Keyboard shortcuts for google and youtube
// ==UserScript==
// @name Keyboard shortcuts for google and youtube
// @version 0.1
// @description Adds shortcuts for google and youtube
// @author Mordo95
// @match *://*/*
// @icon https://www.google.com/s2/favicons?domain=google.nl
// @grant none
// ==/UserScript==
@Mordo95
Mordo95 / userscript.js
Last active February 20, 2024 23:39
Tampermonkey script to add a download button to facebook, reddit and youtube videos
// ==UserScript==
// @name Video Downloader for Tampermonkey
// @version 0.4
// @description Will add a download button to Reddit, Facebook and Youtube videos
// @author Github/Mordo95
// @match *://*/*
// @grant GM_xmlhttpRequest
// @run-at document-start
// ==/UserScript==
@Mordo95
Mordo95 / testenv.php
Created August 1, 2019 09:26
Laravel add hosts entry and vhosts to an xampp environment
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class testenv extends Command
{
/**
* The name and signature of the console command.
@Mordo95
Mordo95 / DSN.cs
Created June 13, 2018 10:11
C# DSN class to Modify or query ODBC sources
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
public enum ODBC_ACTION : int
{
ADD_DSN = 1,
CONFIG_DSN,
REMOVE_DSN,
@Mordo95
Mordo95 / Internal.php
Last active March 1, 2018 16:08
A function to check if the call was internal, since PHP does not have the internal access modifier.
<?php
abstract class Internal {
protected function checkInternalCall() {
$bt = debug_backtrace();
if (count($bt) < 2 || !isset($bt[1]['class']) || substr($bt[1]['class'], 0, strlen(__NAMESPACE__) + 1) != __NAMESPACE__ . "\\")
throw new \Exception("This function is marked as 'internal' and cannot be called outside of the namespace");
}
@Mordo95
Mordo95 / TcpProxy.cs
Created February 7, 2018 15:10
Asynchronous TCP proxy in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace HolePunchTest
{
public class TcpProxy
@Mordo95
Mordo95 / YoutubeLive.cs
Last active October 21, 2017 11:13
Streams youtube live to Ffmpeg
//Created by Spike2147 (Mordecaii95 on Github)
//Please credit if you use!
//If this goes in violation of any terms and conditions, please contact me directly.
public class YoutubeLive
{
//src: https://gist.github.com/Boztown/8060963
public static string IdFromUrl(string url)
{