This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cppkill - for when people won't stop attempting to compile your | |
// C code with a C++ compiler and complaining about compile errors | |
#ifndef CPPKILL_H | |
#define CPPKILL_H | |
#ifdef __cplusplus | |
#error This is C code, so please use a C compiler. Thanks :) | |
#endif | |
enum yes_this_is_valid_in_c_thank_you { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* https://gist.github.com/bradenbest/af3c83230e11cf1b5aaeb05598398df6 | |
* magsq v1.0 by Braden Best, 2018 | |
* Public Domain, no warranty. | |
* | |
* A simple program that calculates a magic square of order n. | |
* | |
* The cool part is that I did all of this with a flat "1D" array using the | |
* formula y * w + x to serialize a coordinate pair (x, y) as an array index, | |
* which technically makes this a hash table. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/dc | |
[ | |
dc(1), or desktop calculator, is a unix program. It is one of the oldest, predating even the C programming language. | |
dc is slightly easier than brainfuck | |
---- | |
This version of 99 bottles is pretty rudimentary and lacks proper punctuation | |
]c | |
100sg # register g: (int) 100 | |
[ bottle(s) of beer]sh # register h: (str) " bottle(s) of beer" |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# ^^^ IMPORTANT! Always make sure to specify which python. Can't tell you how many times I've had a python program break on me cause it *assumed* python 3 was my default. In fact, mal does that, too. I should probably open an issue on that. | |
# Note: this is a set of three fake program meant to demonstrate program interoperability. This does not actually torrent anything. | |
# This is meant to simulate passing 'mal torrent' as requested here: | |
# https://github.com/ryukinix/mal/issues/64 | |
# this doesn't have to be marked executable. `python3 mal-torrent.py` should work also. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Input(el){ | |
var parent = el, | |
map = {}, | |
intervals = {}; | |
function ev_kdown(ev) | |
{ | |
map[ev.key] = true; | |
ev.preventDefault(); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Converts audio formats in bulk | |
# requires avconv | |
fformat=m4a | |
tformat=mp3 | |
c=0 | |
t=0 | |
files=*.$fformat |
NewerOlder