Skip to content

Instantly share code, notes, and snippets.

@honorelsu
honorelsu / site
Created May 3, 2015 18:50
Late Graduation party
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Late Graduation Party Invite</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="aassets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
@honorelsu
honorelsu / site
Created May 3, 2015 18:47
late graduation party
<body>
<div class="container">
<div class ="row">
<div class="col-xs-6">
<img class="img-responsive" src="LateGraduation.png" alt="LateGraduation"
</div>
<div class="col-sm-6">
<h1>Late Graduation Party</h1>
<p>Please joins us to celebrate. Food will be provided. BYOB</p>
<p>When: May 16, 2015 @2p - 7p</p>
require 'CSV'
input_path = ARGV[0]
output_path = ARGV[1]
output_array = Array.new
regex = /^([a-zA-Z]*).*$/
#class
@honorelsu
honorelsu / ops.rb
Created December 31, 2014 16:27
OPS
require 'CSV'
input_path = ARGV[0]
output_path = ARGV[1]
class OutputRow
attr_accessor :dcs_tags, :alarm_hihi_enabled, :alarm_hihi, :alarm_hihi_pri, :alarm_high_enabled, :alarm_high, :alarm_high_pri,
:alarm_lolo_enabled, :alarm_lolo, :alarm_lolo_pri, :alarm_low_enabled, :alarm_low, :alarm_low_pri
def csv_row
@honorelsu
honorelsu / compare.rb
Created December 29, 2014 21:05
CSV to Array of Hashes
require 'CSV'
require 'easy_diff'
dcsexport = ARGV[0]
opsexport = ARGV[1]
def csv_to_array(file_location)
csv = CSV::parse(File.open(file_location, 'r') {|f| f.read})
fields = csv.shift
csv.collect {|record| Hash[*fields.zip(record).flatten]}
@honorelsu
honorelsu / hw5.cpp
Created October 30, 2014 02:22
C++ Functions Example
//Original equation from Homework #4
//double avg_hw=sum_homework_grades/count_homework_grades;
#include<iostream>
using namespace std;
//Average function
//The first line is the header
//You set the data type based on what this function will return
@honorelsu
honorelsu / hw5.cpp
Created October 30, 2014 02:22
Grader broken into functions
#include <iostream>
#include <string>
using namespace std;
int main()
{
int main_menu_choice=0;
double homework_grades;
double sum_homework_grades=0;
int count_homework_grades=0;
#include <iostream>
#include <string>
using namespace std;
int main()
{
//Moved the variable declarations out of the loop
int main_menu_choice=0;
double homework_grades;
double sum_homework_grades=0;
require 'mathn'
count = 1
user_input_for_matrix_array = Array.new
puts "3x3 Matrix Calculator"
until count > 3 do
puts "Enter each row #{count} of your matrix (Ex: '1 2 3')"
user_input = gets.chomp.split(" ").map(&:to_i)
puts "#{user_input}"
@honorelsu
honorelsu / orangetree.rb
Created June 27, 2009 04:03
Orange Tree
class OrangeTree
def initialize tree
@age = tree
@orangecount = 0
@height = 4
end
def pickAnOrange
if @orangecount > 0