Skip to content

Instantly share code, notes, and snippets.

https://www.dropbox.com/s/e1lffx4yhen4bae/travel_student.zip

let's say i'm make a new gist. oooh i want to say this code

# GOAL
To make a beautiful "about" page for Octocat. We want to make it very clear who he is, and we want to provide the best links to more information about him and Github.
The final product should look like this: http://cgoodmac.wpengine.com/wp-content/uploads/2015/07/PFNP-octocat-comp.png
# RESOURCES
## Images:
Octocat: http://octodex.github.com/images/Professortocat_v2.png
@cgoodmac
cgoodmac / Octocat-complete.markdown
Created March 9, 2014 04:51
A Pen by Chris Goodmacher.
@cgoodmac
cgoodmac / DirectoryCopier.java
Created August 13, 2013 00:44
directory copier
import java.io.*;
/*
* Your assignment: This class will copy all the files in one directory to another directories
* in series (not in parallel). You are to modify this to copy multiple files in parallel using threads.
*/
public class DirectoryCopier {
private static final int BUFFER_SIZE = 1024;
@cgoodmac
cgoodmac / Logger.java
Created August 5, 2013 23:04
Singletons in java
/**
* Created with IntelliJ IDEA.
* User: cgoodmac
* Date: 8/5/13
* Time: 6:49 PM
* To change this template use File | Settings | File Templates.
*/
public class Logger {
private static Logger thisInstance;
@cgoodmac
cgoodmac / Search.java
Created August 1, 2013 00:15
Recursive binary search
public class Search {
private Search() {
super();
}
/**
* @param array A sorted array of ints to search through. This must be sorted.
* @param searchTerm An int to search the array for
* @return Whether the searchTerm exists in the array
*/
import java.util.Scanner;
public class IntBST {
private IntNode rootNode;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
IntBST bst = new IntBST();
while(true) {
System.out.print("print, gt or insert: ");
@cgoodmac
cgoodmac / gist:4140325
Created November 24, 2012 16:11
Creating answers to questions
def create
q = Question.create(params[:question])
@auth.questions << q
binding.pry
params[:answers].each do |answer_hash|
a1 = Answer.create(answer_hash.to_param)
q.answers << a1
end