Skip to content

Instantly share code, notes, and snippets.

View justinrolston's full-sized avatar

Justin Rolston justinrolston

  • CoverMyMeds
  • Columbus, OH
View GitHub Profile
import java.util.Scanner;
public class Unit8Project
{
public static void main (String[] args)
{
String apassword1;
String apassword2;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter a password: ");
apassword1 = keyboard.nextLine();
import java.util.Scanner;
public class Unit8Project
{
public static void main (String[] args)
{
String apassword1;
String apassword2;
Scanner keyboard = new Scanner(System.in);
boolean done = false;
@justinrolston
justinrolston / gist:3738137
Created September 17, 2012 15:51
requeue my code
def requeue_failures(date)
failing_features = []
FunctionalTestResult.where(:when_ran => date, :outcome => ['fail', 'fail-new']).select(:feature).uniq.each do |result|
newest = FunctionalTestResult.where(:when_ran => date, :feature => result.feature).order('id DESC').first
unless newest.outcome == 'resolved' || newest.outcome == 'success'
features = Feature.where(:is_current => true, :name => "Feature: #{result.feature}")
.select(:full_file_name)
.uniq
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- Facebook sharing information tags -->
<meta property="og:title" content="*|MC:SUBJECT|*" />
<title>*|MC:SUBJECT|*</title>
<style type="text/css">
@justinrolston
justinrolston / Question_1.sql
Last active December 10, 2015 00:19
Homework
select distinct TVModel, Price as MostRecentPrice
from T_TVPrices T
inner join
(select TVModel as M, MAX(DateUpdated) as D
from T_TVPrices
group by TVModel) X on T.DateUpdated = X.D and T.TVModel = X.M
- Alex Burkhart
- @Saterus
- neo.com
BASICS:
- REPL
- Ruby Classic: IRB
- ****gem install pry-plus****
<HEAD>
<TITLE>Basic HTML Sample Page</TITLE>
</HEAD>
<BODY >
<a href='http://www.google.com' target='_blank' id='test'>My blank target</a>
</BODY>
@justinrolston
justinrolston / bob.rb
Created September 5, 2013 02:43
bob exercise
class Bob
def hey statement
return 'Fine. Be that way!' if statement.strip == ''
return 'Woah, chill out!' if statement == statement.upcase
return 'Sure.' if statement[-1,1] == '?'
return 'Whatever.'
end
end
def tweet(message)
if tweet <= "140"
@client.update(message)
else
puts "Cannot send tweet over 140 characators"
end
end
@justinrolston
justinrolston / output
Created September 19, 2013 01:33
choose-your-own-talk
Justins-MacBook-Air:Code justinrolston$ cd choose-your-own-talk/
Justins-MacBook-Air:choose-your-own-talk justinrolston$ bundle
Using colorize (0.5.8)
Using rack (1.5.2)
Using redcarpet (3.0.0)
Using syntax (1.0.0)
Using tty_markdown (0.0.1) from git://github.com/dapplebeforedawn/tty_markdown.git (at master)
Using bundler (1.3.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Justins-MacBook-Air:choose-your-own-talk justinrolston$ bundle exec ./choose.rb