Saturday, March 25, 2017

Developing a Web Application from Requirements.

 Given you are the owner of a veterinary practice, create a basic Rails application that satisfies the following user stories:

1. As the owner of the veterinary practice, I have two additional veterinary doctors Bob and Susan. I should be able to track the following information about myself and my fellow veterinary doctors.

Name - must be no longer than 35 characters; value is required
Address
City
State
Zip - should be at most 5 digits
School Received Degree From
Years in Practice - must be value between 1-100

2. As the receptionist of the veterinary practice, I should be able to schedule an appointment for a customer's pet with a specific veterinary doctor. The appointment should contain the following information.

Date of Visit - date cannot be in the past; value is required
Pet - required
Customer -required
Requires Reminder of Appointment
Reason for Visit – required

3. As one of the practicing veterinary doctors, I should be able to record the following information about a customer's pet.

Name of Pet - required, no more than 35 characters
Type of Pet - must be a dog, cat, or bird
Breed - required, no more than 35 characters
Age - required
Weight - required
Date of Last Visit – required

4. As a customer, I should be able to see when my pet is scheduled for their next appointment

Pet's Name
Date of Next Appointment
Reason for Visit


Saturday, March 18, 2017

How to split videos in command line

The command:

ffmpeg -i source-file.foo -ss 0 -t 600 first-10-min.m4v

will work but is slow. Solution:

ffmpeg -ss 00 -t 00:01:0.0 -i source.mp4 -vcodec copy -acodec copy result.mp4

Will split the source.mp4 from the beginning to the first 60 seconds and save it in result.mp4.

Friday, March 17, 2017

How to Concatenate Video Files

I needed to stitch intro and outro to my screencast video. I installed ffmpeg on my mac, created a text file, stitch.txt:

file './intro.mp4'
file './semantics3.mp4'

file './outro.mp4'

To stitch videos:

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Install ffmpeg on Mac

To concatenate intro and outro to my screencasts, I use ffmpeg to stitch the videos from the command line. It is faster and easier than using the ScreenFlow.

brew options ffmpeg

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools


Sunday, March 12, 2017

How to Setup Textmate to use RVM

Go to Textmate preferences, click on Variables and create a TM_RUBY variable the value should be set to the output of the which rvm-auto-ruby command run in the terminal. The changes will take effect without requiring any restart of textmate.

Sunday, March 05, 2017

configure: error: clang version 3.0 or later is required

~ $gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
~ $clang -v
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0

Thread model: posix