Skip to content

Instantly share code, notes, and snippets.

View RossComputerGuy's full-sized avatar

Tristan Ross RossComputerGuy

View GitHub Profile
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active May 2, 2024 02:25
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@notcancername
notcancername / free_list_allocator.zig
Created January 29, 2024 00:48
A simple allocator wrapper with a free list, sort of, to reuse allocations.
// SPDX-License-Identifier: 0BSD
// Copyright (C) 2024 by cancername <notcancername@protonmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without
// fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
// SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
// AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
@lrvick
lrvick / github-troll.md
Last active May 3, 2024 16:20
Trolling Github's DMCA repo with their own security flaws.
@YukiSnowy
YukiSnowy / main.cpp
Last active March 20, 2024 19:10
example SDL2 Vulkan application
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
SDL_Window *window;
char* window_name = "example SDL2 Vulkan application";
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@andrewrk
andrewrk / 3let.py
Created February 15, 2016 03:27
origin of the zig programming language name. https://github.com/andrewrk/zig/
import string
import random
vowels = "aoeuiy"
def m():
c1 = vowels[random.randint(0,len(vowels)-1)]
c2 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
c3 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
print('z' + c1 + c2 + c3)
m()
@johnlane
johnlane / dockbar-gtk2.py
Last active October 24, 2023 21:43
Example GTK to create a dock-like bar and strut
#!/usr/bin/env python2
#
# dockbar.py
#
# Example program places a coloured bar across the top of the
# current monitor
#
# demonstrates
#
# (a) creating the bar as an undecorated "dock" window
@ryancdotorg
ryancdotorg / dnaas.c
Created October 30, 2013 23:20
Wrapper library to use /dev/null as a service on Linux via LD_PRELOAD
/* This is a wrapper library that will give your server the power of
* /dev/null as a service, as seen at http://devnull-as-a-service.com/
*
* Compile:
* gcc -ggdb -shared -fPIC dnaas.c -ldl -lcurl -o libdnaas.so
*
* Try:
* LD_PRELOAD=./libdnaas.so dd if=/dev/sda of=/dev/null bs=8192 count=16
*
* Install: