Looking at Onshape

I’m a SolidWorks user and have spent considerable time with it over the past several years.  Recently I heard about Onshape.  It looks pretty fascinating – a fresh look at CAD – with full collaboration, versioning, and sharing.

Here is what they say about themselves:

CAD Anywhere, Anytime,
On Any Device.

Onshape is the first and only full-cloud 3D CAD system that lets everyone on a design team simultaneously work together using a web browser, phone or tablet.

The modern web browsers are becoming a truly powerful development platform as illustrated below.  The graphics are (about) as smooth as Solidworks – perhaps not quite so fancy.  But being able to have your CAD anywhere is kind of exciting.  They have a free plan with up to 10 drawings which would be great for schools and students and hobbyists to use.

Update From OnShape: 

Jason  – thank you for the blog post. We here at Onshape are very excited to make professional grade 3D CAD available to everyone for free. Just to clarify, a free user can have UNLIMITED FREE PUBLIC DOCUMENTS AND 5GB OF FREE ONLINE STORAGE. Thats a lot of whatever you’re into :)
In addition – free users ALSO get 10 free private documents (not to exceed 100MB) to test Onshape against a proprietary design need.
Bottom line – if you are a hobbyist or amateur, you can use Onshape for free forever.
Thank you again.
Philip …

2016-01-12 - B092504.png

Introducing FileStruct (for Python)

FileStruct is a lightweight and fast file-cache / file-server designed for web-applications.  It solves the problems of “where do I save all of those uploads” that has been encountered time and time again.  FileStruct uses the local filesystem, but in a sensible way (keeping permissions sane), and with the ability to secure it to a reasonable level.

https://github.com/appcove/FileStruct/

Here is a simple example of taking an image upload, resizing, and saving it:

with client.TempDir() as TempDir:
   open(TempDir.FilePath('upload.jpg'), 'wb').write(mydata)
   TempDir.ResizeImage('upload.jpg', 'resize.jpg', '100x100')
   hash1 = TempDir.Save('upload.jpg')
   hash2 = TempDir.Save('resize.jpg')

Design Goals

Immutable Files

FileStruct is designed to work with files represented by the SHA-1 hash of their contents. This means that all files in FileStruct are immutable.

High Performance

FileStruct is designed as a local repository of file data accessable (read/write) by an application or web application. All operations are local I/O operations and therefore, very fast.

Where possible, streaming hash functions are used to prevent iterating over a file twice.

Direct serving from Nginx

FileStruct is designed so that Nginx can serve files directly from it’s Data directory using an X-Accel-Redirect header. For more information on this Nginx configuration directive, see http://wiki.nginx.org/XSendfile

Assuming that nginx runs under nginx user and file database is owned by the fileserver group, nginx needs to be in thefileserver group to serve files:

# usermod -a -G fileserver nginx

Secure

FileStruct is designed to be as secure as your hosting configuration. Where possible, a dedicated user should be allocated to read/write to FileStruct, and the database directory restricted to this user.

Simple

FileStruct is designed to be incredibly simple to use.

File Manipulaion

FileStruct is designed to simplify common operations on files, especially uploaded files. Image resizing for thumbnails is supported.

Temporary File Management

FileStruct is designed to simplify the use of Temp Files in an application. The API supports creation of a temporary directory, placing files in it, Ingesting files into FileStruct, and deleting the directory when completed (or retaining it in the event of an error)

Garbage Collection

FileStruct is designed to retain files until garbage collection is performed. Garbage collection consists of telling FileStruct what files you are interested in keeping, and having it move the remaining files to the trash.

Backup and Sync with Rsync

FileStruct is designed to work seamlessly with rsync for backups and restores.

Atomic operations

At the point a file is inserted or removed from FileStruct, it is a filesystem move operation. This means that under no circumstances will a file exist in FileStruct that has contents that do not match the name of the file.

No MetaData

FileStruct is not designed to store MetaData. It is designed to store file content. There may be several “files” which refer to the same content. empty.logempty.txt, and empty.ini may all refer to the empty fileData/da/39/da39a3ee5e6b4b0d3255bfef95601890afd80709. However, this file will be retained as long as any aspect of the application still uses it.

Automatic De-Duplication

Because file content is stored in files with the hash of the content, automatic file-level de-duplication occurs. When a file is pushed to FileStruct that already exists, there is no need to write it again.

This carries the distinct benifit of being able to use the same FileStruct database across multiple projects if desired, because the content of file Data/da/39/da39a3ee5e6b4b0d3255bfef95601890afd80709 is always the same, regardless of the application that placed it there.

Note: In the event that multiple instances or applications use the same database, the garbage collection routine MUST take all references to a given hash into account, across all applications that use the database. Otherwise, it would be easy to delete data that should be retained.

Install Root Certificate Authority (CA) on Windows XP

As a developer, it is great to be able to provide my own SSL certificates for preview and development sites.  To this end, I’ve created my own Certificate Authority (CA), and need to import it into my computer and any client computer in order to avoid the scary SSL Certificate Warnings.

Applies to Windows XP.  Not sure about Windows 7.

 

Image

 

Image

 

Image

 

Image

 

ImageImage

 

Image

 

Image

 

Image

 

Image

 

Image

Image

Image

HomeSchool Software: All 700 pages have arrived

I think my inkjet printer is about ready to die…  Between printing GP-7 permit applications (fodder for another post), and a 700 page photo-intensive portfolio, it’s gone above and beyond the monthly duty cycle.

Here is a photograph of the finished portfolio in a 5″ binder printed on 48lb double sided matte photo paper.  It is really neat to look at and remember everything we did this year.

Home School Software in Production Use!

Just an update on the use of our Home School software package…  So far, we have entered 216 activities with 462 images/scans across 13 projects, 12 subjects, and 4 students.

Nearly all of the photographs we take are with the Motorola Droid X.  Provided you have sufficient light, the quality is very acceptable.

Here is one of the latest activities recorded:

Home School Software, Anyone?

2010-2011 was the first year that we were required by PA law to report our schooling activities to the Altoona Area School district.  (simply because our oldest turned 8)

Naturally, the topic of Log and portfolio came up needing solved.

Having been home educated as a child, I recall the massive effort it took to remain organized enough to be able to assemble a really good portfolio at the end of the year.  Also, the log book needed to be throughly kept to provide record of education activities.

Here is a brief list of items that need improved:

  1. Portfolios typically are assembled at the end of the year, which requires a lot of effort.
  2. There is only one copy of a portfolio.
  3. They are a bit kludgy, having a mix of all sorts of media (photos, papers, art, etc…)
  4. They are not searchable
  5. They are not sortable
  6. They are not printable
  7. They are not email-able
  8. They are not backup-able
  9. They typically show only the “best” work, by virtue of what they are (depends on the assembler)
  10. They are separate from the log of the actual activities
  11. Etc…

Well, after a lot of here and there, I decided we needed a database.  So my wife and I designed a database that would handle a number of aspects:

  1. Multiple Students
  2. Subjects as required by law
  3. Projects that are a part of schooling
  4. Activities and Events
  5. Dates
  6. Summaries
  7. Descriptions
  8. Scanned documents
  9. Photographs
  10. PDF files

The ultimate goal is to be able to send off for a printed book with the above content, and turn that into the school district.

I thought that a web interface would be appropriate.  So here is where I am at after a couple days of tinkering around…

 

 

 

 

 

 

If anyone expresses interest in seeing more of this, post a comment.

Thanks!

 

Test Post with ecto

I’m making a test post with ecto. Ecto is desktop publishing solution for the Mac platform, which works with wordpress among others.

For starters, here is a picture:

201012022310.jpg

And here is some source code:


def Select(Account_MNID):
  return App.DB.Row(”’
SELECT
“Account_MNID”,
“Name”,
“CreateDate”,
“ChangeDate”,
“Address1”,
“Address2”,
“Address3”,
“City”,
“State”,
“Zip”,
“Country_MSID”,
“Phone”,
“Fax”,
“Email”,
“Note”,
“Perm_Active”
FROM
“ACRM”.”Account”
WHERE true
AND “Account_MNID” = $Account_MNID
”’,
    Account_MNID = Account_MNID
    )

It is important to me that code shows up correctly once posted. For clarity, I will take a screenshot of the code…

201012022313.jpg

Lastly, I need to see what happens when I post a high quality photo from my desktop…

I did this one by dragging the photo from Finder onto this Ecto window.

2010-11-24_11-13-11_968.jpg

As an edit, I clicked the insert image button, and used a preset to specify 700px wide, but as a thumbnail…. Let’s see.

2010-11-24_11-13-11_968.jpg

Ok, good side… Pictures and text seem to flow pretty well. Bad side… Code formatting was lost. I should try wrapping it in the [ sourcecode ] wrapper… I’ll do that next…


# vim:encoding=utf-8:ts=2:sw=2:expandtab
import Extruct
import re
import uuid
import hashlib

from .. import App, ACRM
from . import Validate

from AppStruct.Util import *
from datetime import date

Insert_Validate = App.GetHook(‘CCRM.Account.Insert_Validate’)
Insert_Execute = App.GetHook(‘CCRM.Account.Insert_Execute’)

#============================================================================

def Select(Account_MNID):
  return App.DB.Row(”’
SELECT
“Account_MNID”,
“Name”,
“CreateDate”,
“ChangeDate”,
“Address1”,
“Address2”,
“Address3”,
“City”,
“State”,
“Zip”,
“Country_MSID”,
“Phone”,
“Fax”,
“Email”,
“Note”,
“Perm_Active”
FROM
“ACRM”.”Account”
WHERE true
AND “Account_MNID” = $Account_MNID
”’,
    Account_MNID = Account_MNID
    )

For sourcecode, I guess I’m still stuck editing the HTML.

Look at the markup that was generated with a simple copy/paste from Github…

201012022333.jpg

What is the best way to post source code examples?