This file contains hidden or 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
# http://esolangs.org/wiki/Unnecessary | |
# Unnecessary interpreter for the unnecessary language. | |
# Usage: unnecessary.rb <file> | |
puts "Error: program file exists" if ARGV[0] and File.exist? ARGV[0] |
This file contains hidden or 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
import sys, array | |
# Name to character reference | |
# you can like | |
# modify me | |
# modify me a lot | |
# i likes it | |
ch = { | |
'mniip': '<', | |
'Ristovski': '>', |
This file contains hidden or 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
/* | |
A script that demonstrates integer division in C. | |
Prints two numbers, the first with integer division | |
and the second with floating division. | |
Integer division is achieved by having the divisor | |
be an integer. | |
Compile with anything really. Running produces the | |
following output: | |
0 0.333333 | |
*/ |
This file contains hidden or 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
# -*- encoding:utf8 -*- | |
def magic(width): | |
lines = [] | |
oldwidth = width | |
# going downwards | |
width += 2 | |
while width-2 > 0: | |
lines.append(str.center("* " * (width-2), oldwidth*2)) |
This file contains hidden or 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
# split a square defined by its side w into four equals | |
# for Doxin | |
class Point: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
class Square: | |
def __init__(self, x1, y1, x2, y2): |
This file contains hidden or 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
# A secret HTTP server that only serves some content of a page | |
# when a decent Authorization header has been sent with the | |
# correct data. | |
# By itself will not tell the client that there needs to be an Authorization | |
# header. | |
# woo, secret spy networks! | |
# boxmein 2013 - free to use - idk | |
This file contains hidden or 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
// Something relating to a falling sand game | |
// | |
// Usage: | |
// | |
// After opening the Processing IDE, copy it into an empty new sketch. | |
// Just as simple as that. | |
// | |
// | |
// Playing: | |
// |
This file contains hidden or 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 ruby | |
# echo yay! you ran inmake on inmake itself in default mode! | |
# Option parsing! | |
require 'optparse' | |
opts = {} | |
OptionParser.new do |parser| | |
This file contains hidden or 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 ruby | |
# | |
# Markov.rb | |
# ========= | |
# | |
# A weighted Markov chain [text] generator implementation in Ruby | |
# Actually works! | |
# | |
# | |
# Usage |
This file contains hidden or 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
/* | |
extrapolate.js | |
============== | |
A small utility function that allows Ruby-like string extrapolation | |
via #{expr}. Relies on ES5's Array#forEach but is relatively easy | |
to convert not to use it. | |
...that's it, folks! |