Table of Contents

Thomas Hakes's Opus

HELP ME PLEASE MY CAPSLOCK IS STUCK DOWN AND I CANT GET IT BACK UP I TRIED EVERYTHING BUT NOTHING IS WORKING

Introduction

In this opus, I will be posting everyday. I have been wanting to do this for a while since last year my opus was dry and untamed. By posting everyday I hope to achieve a constant flow of work being produced and thereby making me more productive. The posts will be completely random and may not even pertain to any classes I am currently taking, but there will be intelligent content throughout the semester.

I am a sophomore this year and I have a dual major in Computer Science and High Performance Computing.

Part 1

Entries

August 29, 2012

Today I am beginning my Gentoo build. In this I hope to learn more about file systems, kernels, and the bells and whistles of what is a linux operating system.

As I begin my journey, I am immediately formatting the drive for installation. Here I learn that ext2 is the oldest format for a linux – I will finish this later.

Let's talk about that SPARCstation IPX on that desk back there. I wanna put some debian on that. Before this, let's learn more about this machine.

SPARCstation IPX -

  • Has SCSI port - I need to do some research on this
  • CPU clocks at 40 Mhz (cool!)
  • holds a 50 pin hard drive – this is a lie, it's a 68 pin
  • no IDE/ATAPI support (don't need it)

and as for the network support, well, wikipedia quoting time “The SPARCstation IPC comes with an on-board AMD Lance ethernet chipset providing 10Base2 and 10Base5 via an AUI transceiver.” –this is all fine and dandy but i have no idea the capabilities of 10Base2 nor 10Base5

also the SPARCstation will not boot, due to the nvram being dead. Needs some battery power – tomorrow we will fix this hopefully

<br> So let's break this down even more

SCSI - Small Computer System Interface; is a standard for connecting and transferring data between computers and devices. It connects not only hard drives, but stuff like CD + floppy drives, printers, scaners, ect. Big things about scsi

  • Up to 8 or 16 devices can be attached to a single bus – hardcore
  • communication takes place between an initiator and a target
  • has to be terminated with a resistor I think
  • The “small” part in SCSI is historical; since the mid-1990s, SCSI has been available on even the largest of computer systems

nowadays it almost does not exist.

NVRAM - Non-volatile random-access memory; is a RAM (Random Access Memory) that keeps it's information after it's turned off – WHAAAAAAAT (mind blown)

  • The best-known form of NVRAM memory today is flash memory.
  • the nvram allows certain rom's to be written electrically by the end-user – meaning you can edit the bios electrically (PROM)
  • runs off of a battery – since this is a chip, i am going to need help sawing and plugging some batteries into it to make it work again
  • IPC holds system information such as MAC address and serial number in NVRAM

10base5 - call me ethernet, thick ethernet.

  • used cable similar to RG-8/U coaxial cable but with extra braided shielding – That's pretty thick yo
  • fire resistant cable – i'd like to test this out someday
  • 10base5 - 10 refers to 10mib connection, base= baseband (instead of broadband), and 5 stands for the maximum segment length of 500 meters
  • obsolete

August 30ist, 2012

Watching Eagles are turning people into horses the movie. Haven't seen it yet? http://www.youtube.com/watch?v=c1-Oep9uNwM

I need to go back to the whole formatting thing on gentoo.

  • ext2 doesn't have metadata journaling
  • ext3 does have metadata journaling, but has the same limitations on file transfer as ext2 did
  • ext4 has removed such limitations

i decided to go with 3 partitions: one swap, one boot partition, one full size love boat.

–totally just came into wedge's discrete class in a full gumby costume (hah)

not going to touch the nvram today without a trained perfessional overlooking me

let's look at the sun architecture later

August 31, 2012

f**k it we are hitting this nvram today

basically we are smacking the batteries together and then to the nvram using copper wire. jacob's soughing right now.

okay it took 3 hours to solder that. Jake and I took turns smacking the batteries with solder and trying to get the wires to stick. We eventually figured a method of dripping the solder on the wire whilst on the battery, then folding the solder over creating a contact strong enough that worked. After finally getting it to stick (and about 6 inches of solder), we got it together. I wrapped it with electrical tape and smacked it into the ipx.

Boom. Success.

The best part was that it worked the first time (unlike the solder).

Okay the soldering was done, now comes the part of configuring the hostid and the mac address. After much research, Jake discovered several ways to export a value into the nvram to get it to change values: mkpl. After configuring the hostid (and much arm flailing) wedge came over and typed “set-defaults” and it booted the linux.

Incase I forgot to add this: we are running debian woody version 3.0 off of a disc i burnt from the interwebz in a caddy into a cdrom drive specifically for sun4c computers.

So jake, matt, and I continued our path to installing the OS. After much box checking, we came across the formatting for the partition table. It was very similar to fdisk and I decided to give a stab at it.

I set it up exactly like the gentoo build I did earlier

  • boot sda1
  • swap sda2
  • fs sda3

apparently sun4c didn't like that. THEY USE SOMETHING SO MUCH BETTER

matt told us (as we were snacking) that these types of computers (i'm not sure what domain to put them into) use a special formatting table. in the end it looked like this

  • boot sda1
  • swap sda2
  • everything in the entire world + boot + swap sda3

Yeah, sda1 and sda2 are contained within sda3

needless to say i was scared. my jimmies were rustled pretty well.

Yet I was un-rustled when he explained that this is called a slice style formatting table. Meaning the computer sees the whole drive before it sees the boot partition and the swap. That makes sense (i guess)

boom, yada yada yada, no hangups, no hangups

woody was installed.

September 1nth, 2012

VI IS THE BEST TEXT EDITOR OF ALL TIME JUST LOOK AT THIS CHART AAAAAAAAAAAAAAH

searching for some more support for older sparc machines i came across some wonderful l.e.d. hacks that may resurface later

I can't even find any information on the sun architecture and how it differs between i386 and amd64. :((((((

fixed one of my co worker's computer. His dell xps 600 kept seeing his phone as a camera. Went on device manager and updated the drivers. Fixed. It was also not playing dvd's so i spent a lot of time trying other things but it ended up being a corrupted codic for media player. Fixed.

I'm going to read this entire C book beginning to end.

Chapter 1! ( I can't read with music playing so it's taking me a while before I finally turned it off)

The Basics this book will cover

  • variables and constants
  • arithmetic
  • control flow
  • functions
  • the rudiments of input and output

1.1 hello world (resisting the urge to check facebook)

*/ This code is part of thakes3's opus /*
#include <stdio.h>

int main()
 {
   printf("YO WORLD WAZAP");
   return 0;
 }

compiled with gcc leik dis:

lab46~: gcc -o yoworld.o yoworld.c

bam works. moving on:

1.2

This program converts Farenheit temps to Celsius.

I CANNOT GET THIS OUT OF MY HEAD : http://www.youtube.com/watch?v=LJSFlMCTXE8 –horse takes it to the limit.

I want to try that game later, never played it. back the the 'gram

  /* this code is for thakes3's opus */                                                                                                                                          
  #include <stdio.h>
  
  int main()
  {
      float fahr, celsius;
      int lower, upper, step;
   
      lower = 0; // lower limit of temperature table 
      upper =300; // upper limit
      step = 20; // step size
  
      fahr = lower;
      while (fahr <= upper) {
          celsius = (5.0/9.0) * (fahr - 32);
          printf("%3.0f %6.1f\n", fahr, celsius);
          fahr = fahr + step;
      }
      return 0;
  }

tested and works. this one uses a while loop to do the math and print out each value before returning to do another. genius stuff people

1.3

I am on page 12 and I am retiring this for the night as I want to read into another possible project; turning my old android phone into a machine i can ssh into

September 6, 2012

Yeah I forgot about the opus for the past few days but I'm sticking too it. I need to do this.

Today Jake and I installed FreePBX on a computer and played with it a little but we made no headway because we couldn't get the gui running and asterisks wasn't popping up. Will look into later.

Sat in data structures, learned about the sizeof thingy within C. It's pretty neat because it'll tell you the amount you can store within a variable. The challenge was to find the sizeof the largest container within C. It was simple, yet complex. I'm anxious to see how that will tie in with the structures.

Update on the SPARC machine; this POS doesn't like our solder job. Pressly said he would fix it (he is so nice to us). So all the important information is cleared and we need to fix it :(.

September 6th 2012

September 7th 2012

So today we got back to the sparc, sync'd the time to juicebox (our time server). For some strange reason it will not sync if it is years apon years off, so we had to edit the time to get it close enough.

After this we got back the OS. From there we decided to get a better package manager other than tvm. fvwm was a perfect fit as it was light enough for the processor, yet strong enough to handle certain applications.

cover : au file stream, /dev/audio , firefox (phenox + firebird)

September 10th 2012

Doing a build of openbsd right now.

Installed via CD. the installation was actually pretty easy. from the very base install it has fvwm already. I used pkg_add to install a package manager called “pkg_mgr”. I've been using the hell out of it because openbsd has literally nothing on it from start. I can't get a decent version of vim on this thing and i suck at nano so therefore nano is out of the question.

something to note: openbsd uses the ksh console instead of bash, and i don't know why. Pretty weird stuff.

I would like to get my double head working again but it looks like i need to find a driver for the graphics card and i can barely find vim. lxfe installed ok though and works like a champ. Also got firefox in here which is great. Flash is going to be tough but there may be a version out for it. More research to find out.

SUBWAY SUBS ARE 5.40$ WITH TAX GO GET ONE AND EAT IT RIGHT NOW

Also openbsd doesn't come with lspci, you need to get the package ;_;.

Links for Later

* http://undeadly.org/cgi?action=article&sid=20080506180146 * http://www.openbsd.org/cgi-bin/man.cgi?query=radeon * http://www.openbsdsupport.org/gnome-GDM.html * http://forums.freebsd.org/showthread.php?t=16823

September 13th 2012

Let me tell you why openbox sucks compaired to Xfce4.

  • Openbox looks like a 12 year old drew it
  • terminator is a shitty python script that sucks D
  • Xfce is stable AF, openbox always had some quirky problem

ok

September 14th 2012

I have began to switch everything I use in terminal to something different in order to become more worldly. Just because one person likes nano doesn't make it the one true path.

Tmux baby http://www.jeffstory.org/wordpress/?p=132

Emacs, the dark side of text editing. Good i like evil. http://sip.clarku.edu/tutorials/intro_emacs.html

good stuff people.

September 17th 2012

Anelio's sub: Chicken wing w/ blue cheese

  • Blue cheese per bread ratio 3:1
  • Amount of chicken strips: 3
  • overall rating: 2/10
  • recommend? never

Haas and I have been working on a script lately that will pull the homework from haas's web server, grep for the lines that contain the homework, and create a update system for lab46 that will alarm people when there is homework due in the class the day of.

It's been going OK so far, unfortunately I need to be hand-held throughout a lot of it. Hopefully someday I can write my own script that will work and I will understand. But the regex on this is killing me.

Working on some keywords that will hopefully be done tomorrow for class. Also my barb is almost level 50 in d3. Didn't know if anyone wanted to know that. BUT I DIGRESS

I am almost more efficient with emacs than I am with vim. Mostly because i keep looking up keystrokes for it out of sheer boredom. Tmux is still wonderful: when you split your screens it doesn't go away until you tell it too. No need for a script in the first place it's already been there and back. Take that GNU!

Keywords

data Keyword 1

Database

Definition

A collection of data that is organized so it can easily be modified, updated, or deleted.

References

Structure Pointer Phase 2

Definition

A special operator that permits expressions written as ( (*X).y ) to be more clearly expressed as ( X→y )

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

http://gd.tuwien.ac.at/languages/c/programming-bbrown/c_078.htm

Demonstration

This code points to NULL, then tries to print the hex equivalent. This will cause a seg fault as the computer cannot display a null value.

#include <stdio.h>
 
char *poop = NULL;
int main()
{
  printf(" The location of poop is %x ", *poop);
  return 0;
}

datacomm Keyword 1

MAC Address

Definition

A unique identifier code given by the NIC (network interface card) to communicate on a physical network.

The standard format for printing mac addresses is six groups of two hexadecimal numbers usually followed by hyphens or colons.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

Wikipedia

Programming with Datagrams Phase 2

Datagrams

Definition

A packet delivery system comparable to the Mail system. It is given an address and it has no guarantee of it's delivery.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

A simple example of VoIP would be Google Voice. Using sipgate with Google Voice, you are able to make free VoIP calls.

This is not easy to demonstrate… hmm http://lifehacker.com/5349506/make-free-voip-calls-from-google-voice uhmmm

hpc1 Keyword 1

SPARC

Definition

SPARC , a registered trademark of sun microsystems, is a ==S==calable ==P==rocessor ==Arc==hitecture set after the RISC instruction set.

The “Scalable” in SPARC comes from the ability to scale from embedded processors up through large server processors, all sharing the same core.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

Wiki-shmedia

hpc1 Keyword 1 Phase 2

X11

Definition

A graphical interface used for basic interactions with a user, mostly used in a unix os.

References

Demonstration

A good example of X11 would be the xorg.conf file used by nearly every computer with a X server. This is the configuration file with all the settings to your screen.

lab46:~$ less xorg.conf

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0 
        Screen      1  RightOf "Screen0" 0 0 
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/cyrillic"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath     "built-ins"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "record"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        #DisplaySize      340   270     # mm
        Identifier   "Monitor0"
        VendorName   "DEL"
        ModelName    "DELL 1703FP"
        HorizSync    30.0 - 80.0
        VertRefresh  56.0 - 76.0
        Option      "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "SWcursor"                  # [<bool>]
        #Option     "Dac6Bit"                   # [<bool>]
        #Option     "Dac8Bit"                   # [<bool>]
        #Option     "BusType"                   # [<str>]
        #Option     "CPPIOMode"                 # [<bool>]
        #Option     "CPusecTimeout"             # <i>
        #Option     "AGPMode"                   # <i>
        #Option     "AGPFastWrite"              # [<bool>]
        #Option     "AGPSize"                   # <i>
        #Option     "GARTSize"                  # <i>
        #Option     "RingSize"                  # <i>
        #Option     "BufferSize"                # <i>
        #Option     "EnableDepthMoves"          # [<bool>]
        #Option     "EnablePageFlip"            # [<bool>]
        #Option     "NoBackBuffer"              # [<bool>]
        #Option     "DMAForXv"                  # [<bool>]
        #Option     "FBTexPercent"              # <i>
        #Option     "DepthBits"                 # <i>
        #Option     "PCIAPERSize"               # <i>
        #Option     "AccelDFS"                  # [<bool>]
        #Option     "IgnoreEDID"                # [<bool>]
        #Option     "CustomEDID"                # [<str>]
        #Option     "DisplayPriority"           # [<str>]
        #Option     "PanelSize"                 # [<str>]
        #Option     "ForceMinDotClock"          # <freq>
        #Option     "ColorTiling"               # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "RageTheatreCrystal"        # <i>
        #Option     "RageTheatreTunerPort"      # <i>
        #Option     "RageTheatreCompositePort"  # <i>
        #Option     "RageTheatreSVideoPort"     # <i>
        #Option     "TunerType"                 # <i>
        #Option     "RageTheatreMicrocPath"     # <str>
        #Option     "RageTheatreMicrocType"     # <str>
        #Option     "ScalerWidth"               # <i>
        #Option     "RenderAccel"               # [<bool>]
        #Option     "SubPixelOrder"             # [<str>]
        #Option     "ClockGating"               # [<bool>]
        #Option     "VGAAccess"                 # [<bool>]
        #Option     "ReverseDDC"                # [<bool>]
        #Option     "LVDSProbePLL"              # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "DRI"                       # [<bool>]
        #Option     "ConnectorTable"            # <str>
        #Option     "DefaultConnectorTable"     # [<bool>]
        #Option     "DefaultTMDSPLL"            # [<bool>]
        #Option     "TVDACLoadDetect"           # [<bool>]
        #Option     "ForceTVOut"                # [<bool>]
        #Option     "TVStandard"                # <str>
        #Option     "IgnoreLidStatus"           # [<bool>]
        #Option     "DefaultTVDACAdj"           # [<bool>]
        #Option     "Int10"                     # [<bool>]
        #Option     "EXAVSync"                  # [<bool>]
        #Option     "ATOMTVOut"                 # [<bool>]
        #Option     "R4xxATOM"                  # [<bool>]
        #Option     "ForceLowPowerMode"         # [<bool>]
        #Option     "DynamicPM"                 # [<bool>]
        #Option     "NewPLL"                    # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "RV530 [Radeon X1600]"
        BusID       "PCI:1:0:0"
EndSection

Section "Device"
        Identifier      "d10"
        Driver          "udlfb"
        BusID           "USB"
        Option          #"fbdev" "/dev/fb1"
        Option          "ReportDamage" "true"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
 SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
  • The server layout would be where you define how many screens you have and the layout of the screens.
  • The file section tells xorg what config files to use.
  • The module section tells xorg what modules to load like fonts.
  • The input section tells xorg you have a keyboard and mouse.
  • Obviously the monitor section tells xorg you have a monitor and the settings for that.
  • The device section tells xorg what drivers to use for your video card.
  • The screen section combines the cards with the corresponding screen.

Experiment 1

Question

Can non volatile ram be revived by Frankenstein-ing it with two triple A batteries and solder?

Resources

Hypothesis

Jake and I believe that by shaving the nvram for connectors, soldering the batteries to wire, and the wire to the nvram, that we can revive the dead chip within the sparc ipx and therefore allow it to run.

Data

<pic goes here> We opened the case, soldered the batteries to wire, soldered the wire to the battery, stuck the chip in, and booted it right up

Analysis

Based on the data collected:

  • Was your hypothesis correct? yes
  • Was your hypothesis not applicable? no
  • Is there more going on than you originally thought? (shortcomings in hypothesis) soldering sucks
  • What shortcomings might there be in your experiment? definitely should have used flux
  • What shortcomings might there be in your data? ^

Conclusions

GORILLA MUNCH IS DELICIOUS AND I LIKE TURTLES

Part 2

Entries

Entry 1: October 10, 2012

Whew, haven't done this in a while.

Starting to read the Beej's guide to network programming. Haas has stated that if I can write network code independent of resources I will receive an A in datacom.

OK DONE

Entry 2: October 26, 2012

Today i'm putting a huge dent into this network programming. So far I have learned that programming in windows is kinda insane, and with unix it provides a greater learning environment.

There are two main structures used in network programming (for c++), struct sockaddr and struct sockaddr_in. The last one is how sane people structure the program so it can travel over the internet. Within that struct contains a unsigned short int for the port and a short int for the address family.

Entry 3: October Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: October 31, 2012

Trick or Treat!

YEA IM GETTIN SOME CANDY

Y.U.M. = Yellowdog Updater Modified R.P.M. = Redhat Package Manager

It seems there is a great difference between these two. They are both structured over the rpm distributions and they cannot be ported to debian based distros like Ubuntu. YUM > RPM because it can install the dependencies for you. That means if you don't know how to exactly configure the dependent programs, it will do it for you.

Keywords

data Keyword 2

array vs. linked list (pros/cons)

Definition

An array is a simpler, easier format for multiple value storage. You do not need to go threw the list in an array, you can use that element of the array. Linked lists have no benefits.

data Keyword 2 Phase 2

stack pop operation

Definition

Stack is a data structure that is used to keep things in order. A stack allows adding and removing items in order. When something is added to the stack it goes to the top of the stack, and the first item added to the stack is the last item to be removed.Pop is the operation used to remove an item from a stack.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Wikipedia
  • class
  • c book

Demonstration

Demonstration of the indicated keyword.

This is an edited version of the code on wikipedia. <code c> void push(STACK head, int value) {

  STACK *node = malloc(sizeof(STACK));  /* create a new node */

if (node == NULL){

      printf("Error: no space available for node\n");
      abort();
  } else {                                    
      node->data = value;
      node->next = empty(*head) ? NULL : *head; /* insert new head if any */
      *head = node;
  }

} </code>

datacomm Keyword 2

Network Socket

Definition

It is an endpoint for network communication.

References

Wikipedia

datacomm Keyword 2 Phase 2

FireWire Network

Definition

A way to transfer and share files between computers using only one wire between the computers.

References

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

hpc1 Keyword 2

make

Definition

make is the gnu utilities to maintain large groups of programs.

References

wikipedia

hpc1 Keyword 2 Phase 2

make

Definition

make is the gnu utilities to maintain large groups of programs.

References

wikipedia

Demonstration

Demonstration of the indicated keyword.

CFLAGS = -Wall
INC =
CC = gcc $(CFLAGS) $(INC)
SRC = $(shell /bin/ls -1 *.c)
OBJ = $(SRC:.c=.o)
BIN = linkedlistprog
all: $(SRC) $(OBJ) $(BIN)
 
debug: CC += -DDEBUG -g
debug: DEBUG = debug
debug: $(SRC) $(OBJ) $(BIN)
 
linkedlistprog:
ifneq ($(MAKECMDGOALS),debug)
    @printf "[B]   %-20s ... " "$(BIN)"
    @$(CC) -o $(BIN) $(OBJ) && echo "OK" || echo "FAIL"
else
    $(CC) -o $(BIN) $(OBJ)
endif
 
 
.c.o:
ifneq ($(MAKECMDGOALS),debug)
    @printf "[B]   %-20s ... " "$<"
    @$(CC) -c $< && echo "OK" || echo "FAIL"
else
    $(CC) -c $<
endif
 
copy:
    mkdir -p ~/src/data/linkedlist1
    cp -v /var/public/data/fall2012/linkedlist1/* ~/src/data/linkedlist1/
 
clean:
    rm -f $(OBJ) $(BIN) core

Experiment 2

Onion Routing

Resources

Hypothesis

Everything you do on the internet is being surveillance. You are never alone on the web, there are always dark forces making sure you're not breaking any laws. Of course, there are ways around being tracked all the time.

One is by the use of onion routing. By bouncing off an onion router, you are able to change your ip and travel the web through a sort of pseudo encrypted environment.

Experiment

In my experiment, I will try to access a blocked website through the campus network connection, then try to connect through onion routing.

Data

I began by trying to go somewhere blocked. Lets say 4chan /g/. When I try to visit the page I get a blocked message by the sonic wall.

So I begin by downloading a tor web browser. This uses a pre configured environment that allows travel via the onion network.

by untaring the folder and running the browser, it begins forwarding the ports through the network.

Once set up, we try the link again.

success, it travels through the network and into the web

Analysis

Based on the data collected:

  • Was your hypothesis correct? yes
  • Was your hypothesis not applicable? no
  • Is there more going on than you originally thought? (shortcomings in hypothesis) nope
  • What shortcomings might there be in your experiment? none
  • What shortcomings might there be in your data? yes

Conclusions

I need to use this more often

Part 3

Entries

Entry 1: November 2, 2012

Today I popped an old hard drive into foxtrot, to see if anything was important in there. After installing and turning it on i quickly realized that the drive was old and bad. But I do not want to unplug it now because I am working.

Wedge has notified me of the command hdparm. Reading into the man page, the -y appendage sends the drive into a shutdown state. Excelent.

I needed to point it at the drive “/dev/sdb” using sudo rights of course.

The command was “sudo hdparm -y /dev/sdb”

Entry 2: November 19, 2012

Today I am studying multi-threading within a computer and how it handles more threads then the general time-division multiplexing. The difference appears to be that in multi-threading, each core handles it's own thread. Whereas in time-division multiplexing only effects one thread at a time.

Entry 3: November 20, 2012

Today Pressly asked for a little help from me today involving some [DATA COMMUNICATIONS] stuff. He had configured a router to bridge connections from ethernet and also wireless connections. From there, we connected my macbook via ethernet to his router. From his computer [192.168.10.100] we pinged my computer [192.168.1.100]. This table can be shown using netstat -nr.

Entry 4: November 28, 2012

After talking about it for so long, On Friday we are about to partake in cleaning the cage by putting things into boxes. This is going to teach us many things that we overlook everyday. Cards that we never knew worked from old suns and pcs.

Keywords

data Keyword 3

Valgrind

Definition

A suite of tools used for debugging an existing program. Like Gcc, it uses a powerful debugging tool used by programmers to find breakpoints in their code.

References

data Keyword 3 Phase 2

prefix (polish) notation

Definition

Polish Notation, also known as Prefix Notation, is a form of notation that puts the operator at the beginning instead of between two numbers or other operations. Example:

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Polish notation is widely used in SPARC's as a means of editing values in a stack.

ok 5 5 +
ok .c
10
ok / 2
ok .c
5
ok

datacomm Keyword 3

Virtual Private Network

Definition

A virtual private network extends a private network through a tunnel to other computers. It is highly secure and uses encryption to port network activity under a tunnel

References

datacomm Keyword 3 Phase 2 Phase 2 Phase 2

Virtual Private Network

Definition

A virtual private network extends a private network through a tunnel to other computers. It is highly secure and uses encryption to port network activity under a tunnel

References

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
 
 
====Demonstration====
Demonstration of the indicated keyword.
 
If you wish to aid your definition with a code sample, you can do so by using a wiki **code** block, an example follows:
 
<code c>
/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Demonstration

hpc1 Keyword 3

Threading

Definition

The art of Operating systems ripping running processes into much smaller strings to be delt with by the cpu.

References

hpc1 Keyword 3 Phase 2

Demonstration

A simple threading example in Java shows how it cycles through threads

//: c13:SimpleThread.java
// Very simple Threading example.
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.

public class SimpleThread extends Thread {
  private int countDown = 5;
  private static int threadCount = 0;
  public SimpleThread() {
    super("" + ++threadCount); // Store the thread name
    start();
  }
  public String toString() {
    return "#" + getName() + ": " + countDown;
  }
  public void run() {
    while(true) {
      System.out.println(this);
      if(--countDown == 0) return;
    }
  }
  public static void main(String[] args) {
    for(int i = 0; i < 5; i++)
      new SimpleThread();
  }
} ///:~

Experiment 3

Question

Can I stream music from one computer to another using commands

Resources

Hypothesis

Using vlc, I should be able to stream music over the network and pick it up on another machine

Experiment

I gots me two machines to use and im finna stream some music using vlc.

Data

Perform your experiment, and collect/document the results here.

Analysis

After several unsuccessful tries with udp, I had to mess with the configuration of the command i was sending out. I learned that ts=mux is needed for streaming (despite what the GUI tells you).

I ended up streaming over http protocol, which gave me better access. The udp packets were all being lost and I have no idea where they were going.

The command i used to stream was this: cvlc ~/Music/myheartwillgoon.mp3 –sout '#transcode {vcodec=h264,acodec=mp3,samplerate=44100}:std{access=http,mux=ffmpeg{mux=mp3},dst=0.0.0.0:12345/stream.flv}'

This allowed my computer to be set up as a web server for others to access and stream the music live.

Conclusions

This wasn't easy to do, but there is quite a bit of documentation on it online. Perhaps in the future this experiment can be enhanced.