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
#ifndef create | |
#define create | |
#define SIZE 255 | |
#define TRUE 1 | |
void newFile(char *filename, char *data){ | |
int i = 0; | |
printf("Enter the file name: "); |
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/ruby | |
# | |
# Author: Jacob Atkins | |
# Email: jta4j@mcs.uvawise.edu | |
# Class: CSC 4300 - Computer Architecture | |
# | |
apps = Dir["./apps/*.hack"].sort | |
@@memory = Array.new(100) |
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
Decimal: <input type="text" name="decimal"/> | |
Converting to base: | |
<select name="base"> | |
<option value="2">2 - Binary</option> | |
<option value="8">8 - Octal</option> | |
<option value="16">16 - Hexadecimal</option> | |
</select> | |
<input type="submit" /> | |
</form> | |
</p> |
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
require 'rubygems' | |
require 'net/ftp' | |
require 'peach' | |
PROTO = 'ftp' | |
URL = 'ladsweb.nascom.nasa.gov' | |
PATH = 'allData/5/' | |
DATASET = 'MOD03' | |
YEARS = 2000..2011 | |
WORKPATH = "#{PATH}#{DATASET}" |
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 | |
# Add non-free repos to apt so we can install java | |
sed -i -e 's/main/main non-free/' /etc/apt/sources.list | |
# Apt section | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y build-essential vim sun-java6-jre mysql-client curl libcurl3 |
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/ruby | |
ipconfig = `ifconfig` | |
interface = /(eth\d)/.match(ipconfig) | |
mac = /([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})/.match(ipconfig) | |
host = `hostname` | |
f = File.open("Macaddresses.txt", 'a') # This file should be on a share that all machines can access. | |
f << "#{host.chomp("\n")}" |
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
*filter | |
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
# Accepts all established inbound connections | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT |
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 | |
apt-get install -y sudo build-essential vim zlib1g-dev | |
/usr/sbin/groupadd wheel | |
/usr/sbin/usermod -a -G wheel jacob | |
chmod +w /etc/sudoers | |
echo "%wheel All=(ALL) ALL" >> /etc | |
chmod -w /etc/sudoers |
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
#include <SoftwareSerial.h> | |
SoftwareSerial rfid(9,11); | |
SoftwareSerial wire(2,3); | |
int SerialResetPIN = 6; | |
int SerialSleepPIN = 7; | |
int RFIDResetPin = 10; | |
void setup() { |
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
#include <LiquidCrystal.h> | |
#include <SD.h> | |
#include <Keypad.h> | |
#include <Servo.h> | |
const int chipSelect = 53; // SD pin | |
const char gpsTag[] = "$GPRMC"; // Start of GPS command | |
LiquidCrystal lcd(2, 3, 4, 5, 6, 7); |
OlderNewer