Skip to content

Instantly share code, notes, and snippets.

@fnuecke
fnuecke / bios.lua
Created December 24, 2014 00:35
Primitive remote code execution via OC network
local m=component.proxy(component.list("modem")())
m.open(2412)
local function respond(...)
local args=table.pack(...)
pcall(function() m.broadcast(2412, table.unpack(args)) end)
end
local function receive()
while true do
local evt,_,_,_,_,cmd=computer.pullSignal()
if evt=="modem_message" then return load(cmd) end
@tbrianjones
tbrianjones / Inflect.php
Last active February 21, 2024 21:28
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy