Skip to content

Instantly share code, notes, and snippets.

View rxbynerd's full-sized avatar

@rubynerd rxbynerd

View GitHub Profile
class LightBulb
attr_accessor :state, :fitting, :filament, :wattage, :voltage
def initialize(wattage, fitting)
@wattage = wattage
@fitting = fitting
puts "creating a light bulb with #{wattage}W with a fitting of '#{fitting}'"
end
def is_on?
college path
C:\Documents and Settings\9892075\Application Data\npm;C:\Program Files\nodejs;C:\Python27;c:\jruby-1.6.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Novell\ZENworks\;C:\Program Files\Windows Imaging\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\QuickTime\QTSystem\
scalas next
@rxbynerd
rxbynerd / README.markdown
Created February 24, 2012 15:48
astounding

Astounding

Linked list in C

Gromit

Fetches email

Bandaid component - A2 Computing - Coursework

Contact @poptartinc if you want to slag him off

#include <stdio.h>
#include <syslog.h>
int main(int argc, const char *argv[])
{
printf("opening syslog...\n");
openlog("sysdemo", LOG_PID, LOG_USER);
syslog(LOG_INFO, "hello world");
closelog();
return 0;
#include <stdio.h>
int main(int argc, const char *argv[])
{
int i, *n;
i = 6;
n = &i;
i--;
printf("%d\n", *n);
return 0;
  1. To hide the complex hardware interactions from the user, and to manage resources like memory and processor time to programs
  2. Processor time - how long each program can spend running instructions, memory to allocate what memory is available to each program, input/output devices to avoid conflicts, and managing secondary storage for storing permanent information such as logs
  3. Processor time => Processor managment, memory => memory managment, i/o => hardware, secondary storage => i/o managment
  4. An embedded system is a computer which is designed to perform one task and one task only, and not function as general purpose as an entire computer. Consider, a router
  5. An embedded system is designed for one task and is not designed to be reprogrammed
  6. A virtual machine is a method of recreating or reimplementing a computer ontop of a computer. A virtual machine can either host an entire operting system, or it can host a programming language by interpreting code and running it based on a limited instruction s
fantastic

12 Jan 2012

Answers

  1. "Standing data"
  2. "the rest of the data"
  3. a) Depends on the size of the bakery, if it's Hovis they should probably be careful, but if it's a corner bakery (a la boutique-city-style), they should probably jump to computerized b) Pilot, don't stick all your hens in one basket c) Direct, computerize the records overnight d) Direct, don't try to fragment two halves of the hospital with different records, although staggering the rollover times may ease system load. Make sure the application can be executed in a virtual machine, and can be configured to sit behind a reverse proxy/load balancer, then it is possible to dynamically scale the system by adding more boxes e) Direct, transition in the summer holidays before new timetables are issued, and early in the summer holidays to allow the system to fail f) Depends on the production state of the factory: if its 277365, do a phased conversion to prevent having everyone from having to down tools. If the factory is shut d
@rxbynerd
rxbynerd / gist:1493517
Created December 18, 2011 14:11
Insert in WorldGenDungeons.java after "world.setBlockWithNotify(i, j, k, Block.mobSpawner.blockID);"
for (int iFuckingHateJava = j + 1; iFuckingHateJava < 128; iFuckingHateJava++) {
world.setBlockWithNotify(i, iFuckingHateJava, k, Block.glass.blockID);
}