Skip to content

Instantly share code, notes, and snippets.

View ieve-rothe's full-sized avatar

ieve ieve-rothe

View GitHub Profile
\documentclass{article}
\begin{document}
\begin{center}
{\small{} Early American History Lecture Notes} \\[0.6cm]
{\small{} Cameron Carroll -- October 30, 2013} \\[0.6cm]
{\small{} Cuyamaca College}\\[1cm]
{\small{} Manifest Destiny}\\[1cm]
\end{center}
\tableofcontents
@ieve-rothe
ieve-rothe / parse_day_argument.rb
Created August 24, 2013 04:43
for Day.rb, a reference to valid day strings
def parse_day_argument(day)
case day
when 'su', 'sun', 'sunday', '0'
return :sunday
when 'm', 'mo', 'mon', 'monday', '1'
return :monday
when 'tu', 'tue', 'tues', 'tuesday', '2'
return :tuesday
when 'w', 'we', 'wed', 'wednesday', '3'
return :wednesday
volumes = [8.0 17.9 28.75 37.70 47.70];
masses = [96.015 105.895 116.529 125.625 135.757];
tare = 88.543;
masses = masses - tare
average_volume = mean(volumes)
average_mass = mean(masses)
m = sum((masses - average_mass) .* (volumes - average_volume)) / sum((masses - average_mass).^2)
//db.js
createUserContainer: function(username, password, callback) {
if (username && password) {
var raw_message = 'BLG' + username;
var fileString = __dirname + '/../user_data/' + username + '.blg';
applib.hashMessage(raw_message, password, function(message) {
fs.writeFile(fileString, message, function(err) {
callback(err);
})
@ieve-rothe
ieve-rothe / Procfile
Created January 25, 2013 07:09 — forked from mojodna/Procfile
web: node app.js
worker: node consumer.js
#include <iostream>
#include <vector>
#include "boost/variant.hpp"
using namespace std;
// employee_data[0] holds employee IDs (int)
// employee_data[1] holds hours worked (int)
// employee_data[2] holds pay rate (double)
// employee_data[3] holds wages (double)
// File: Project_1A_CCarroll.cpp
// Author: Cameron Carroll
// Date: September 11, 2012
// CSIS 138, Project 1 Part A
#include "Project_1A_CCarroll.hpp"
#include <cmath>
double convert_f_to_c(double fahrenheit_temperature) {
double celsius_temperature = (5.0/9.0) * (fahrenheit_temperature - 32.0);
@ieve-rothe
ieve-rothe / install_postgres.txt
Created August 9, 2012 18:46
installation procedure for postgresql on fedora 17
sudo yum install postgresql-server postgresql-libs postgresql-contrib postgresql-devel
sudo systemctl enable postgresql.service
sudo postgresql-setup initdb
sudo systemctl start postgresql.service
su -l postgres
createuser --no-superuser --no-createroles --pwprompt [username]
@ieve-rothe
ieve-rothe / sqlite1.txt
Created July 26, 2012 20:47
pry output showing sqlite search problem
[3] pry(main)> db.execute "select * from Users"
=> [["sanarothe2",
"f82e77528ed1a1cc7fe33fcf751d90b11cd77d45",
"3eec25493d63be0ad6fc3e196d9b0e472babddb7",
"cccb6c91-c722-44cd-adce-51504e717bdb"],
["sanarothe",
"6dc00946d373b7eeffff8b2a09535bd3105eb201",
"0d01e5810b361c02731a8c178014ccbe86ca6f07",
"b315763b-d234-4e2c-908a-7c403987785d"]]
[4] pry(main)> db.execute "select * from Users where Username=?", 'sanarothe'
@ieve-rothe
ieve-rothe / cc_yumfail1.txt
Created July 23, 2012 21:59
yum attempting to delete itself
(continues to list that most (if not absolutely) every package on the system "will be erased.")
...
...
---> Package hyphen-en.noarch 0:2.8.3-1.fc17 will be erased
---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased
---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased
---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased
--> Processing Dependency: /sbin/new-kernel-pkg for package: kernel-3.4.4-5.fc17.x86_64
Skipping the running kernel: kernel-3.4.4-5.fc17.x86_64
--> Processing Dependency: /bin/sh for package: kernel-3.4.4-5.fc17.x86_64