Skip to content

Instantly share code, notes, and snippets.

View adam-phillipps's full-sized avatar

Adam adam-phillipps

  • NGage
  • Salt Lake City, UT.
View GitHub Profile
<Window x:Class="Prac.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Prac"
mc:Ignorable="d"
Title="Connect 4" Height="350" Width="525">
<Grid x:Name="BaseOrganizer" Background="BlueViolet">
<Grid.RowDefinitions>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="0" Margin="0,0,0.068,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="1" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="2" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="3" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="4" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="5" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Ellipse Fill="Red" Grid.Column="0" Grid.Row="6" Margin="0,0,0.497,278" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<El
@adam-phillipps
adam-phillipps / Idea # 2
Last active March 10, 2016 21:52
moved a couple things around to make the expectations a bit more readable
# in the spec
it 'should cycle in either direction blah blah blah' do
# a better way is to set up contexts for each direction you want to cycle
# and test the crap out of it that way but you get the idea, no?
[next, prev].each do |direction|
expect(students_cycle_correctly? cycle_list(direction)).to be true
end
end
# in the helper
# resource_uri = "http://gallery.dev:4000/api/v1/courses/717"
# cleanup_response = RestClient.delete(resource_uri, auth)
# cleanup_response = RestClient.delete(resource_uri, header: auth)
# cleanup_response = RestClient.delete(resource_uri, { 'Authorization' => auth })
# cleanup_response = RestClient.delete(resource_uri, header: { 'Authorization' => auth2 })
# lots of other combos
def auth2
{ 'Authorization' => "Bearer #{ENV['CANVAS_API_TOKEN']}" }
server {
listen 80;
root /home/deploy/asserta_cust_service
index app/views/static_pages/home.html.erb
server_name 23.99.56.151;
location / {
try_files $uri $uri/ /home.html.erb;
}
defaults: &defaults
adapter: postgresql
encoding: utf8
pool: 5
timeout: 5000
username: asserta_cust_service
password: "A553r74"
host: <%= ENV.fetch("DATABASE_ADDRESS", "db") %>
port: 5432
require 'spec_helper'
describe 'User Registration class' do
let(:name) { SecureRandom.hex }
let(:required_params) do
{
name: name,
email: "#{name}[email protected]",
catalog_id: ENV['CATALOG_ACCOUNT_ID']
}
@adam-phillipps
adam-phillipps / Card
Created February 7, 2016 07:10
8 minutes late resubmission
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace A03
{
enum Suit { Clubs = 9827, Diamonds = 9830, Hearts = 9829, Spades = 9824 }
enum Rank { Ace = 1, Deuce, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King }
opts = {:name=>"catauto", :module=>{:size=>1, :assignment=>{:size=>2}}, :section=>{:size=>3}, :course_id=>7682}
*******************************
CanvasFactory::Course
******************************
def initialize(opts = {})
@options = {
name: 'catauto',
module: {
size: 1,
assignment:
@poller.poll(visibility_timeout: @initial_timeout) do |msg|
unless msg.receipt_handle.nul?
@message_receipt_handle = msg.receipt_handle
run_job # run_job deletes message after it's finished
continue_to_poll if viable?
end
@ec2_client.stop_instances({[instance_id: @instance_id]}) if should_stop?
end