Codedrop™ Weblog

Drop’n some code and other tech tidbits…
  • Home
  • Google Shared
  • About Me
  • Reference Links
Rss feed Subscribe

from your old 8mm video to TinyUDF to mp4

Jan.01, 2012 in General Comments Off

Like most people I have accumulated a mass of old technological devices over the years. VHS tapes and old 8mm camcorders have pretty much been obsoleted with the digital age. I recently embarked on a mission to clean house of my old toys but found it a bit of a challenge to convert my old home movies to something useful on my MacBook. This blog captures the steps I took in hopes it may be useful to others with similar circumstances, namely the following:

1) Sony or other brand 8mm cassette recorder that can playback the tapes that you want to convert to a digital format
2) DVD recorder that can burn a DVD from an input signal
3) Mac OSX computer

I was able to hook up my Sony handicam to my DVD recorder and burn a DVD from the analog tape. Seems simple right? Unfortunately my DVD recorder uses TinyUDF format which Mac does not recognize. Putting the completed disk in the drive no files would show up in finder, although it did correctly mount the disk. The problem seems to be permission related and the following steps allowed me to access the files:

1 – open a terminal window
2 – type ‘mount’
3 – identify the folder with the DVD contents. For me was : /Volumes/StorageLabs\ TinyUDF\ Volume
4 – copy the contents of the VIDEO_TS folder to your local drive and then recursively chown / chmod that folder so you can see it in finder (ie. chown -R user VIDEO_TS, chmod -R 777 VIDEO_TS)
5 – use a video converter program such as almersoft DVD ripper to convert the TS files to a .mp4 format

this might not be the best or quickest way to do this, but it did work.

Post to Twitter Tweet This Post

Use Java to disable certificate validation in an HTTPS Connection

Dec.22, 2011 in Java Comments Off

By default, accessing an HTTPS URL using the URL class results in an exception if the server’s certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.

// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[]{
    new X509TrustManager() {
        public java.security.cert.X509Certificate[] getAcceptedIssuers() {
            return null;
        }
        public void checkClientTrusted(
            java.security.cert.X509Certificate[] certs, String authType) {
        }
        public void checkServerTrusted(
            java.security.cert.X509Certificate[] certs, String authType) {
        }
    }
};

// Install the all-trusting trust manager
try {
    SSLContext sc = SSLContext.getInstance("SSL");
    sc.init(null, trustAllCerts, new java.security.SecureRandom());
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
}

// Now you can access an https URL without having the certificate
// in the truststore
try {
    URL url = new URL("https://hostname/index.html");
} catch (MalformedURLException e) {
}

Post to Twitter Tweet This Post

Tags: Java

Enable ssh on your D-LINK DNS-323

Nov.29, 2010 in Linux Comments Off

Found this great article on how to enable ssh a DNS-323. The D-LINK DNS-323 runs Linux, which makes it hackable… this means good things…

First Step – Installing fun_plug

Installing fun_plug is simple. Download the fun_plug tar.gz file here and copy it to “volume_1” root (IE: dns-323/Volume_1/). Also download the “fun_plug” file (non tar-gz) and copy it to the same location.

Reboot (From admin click on “tools” and then “system”) the DNS-323 and  on reboot this file should expand and create a new directory: ffp. It also starts a telnet server (there is that out of the way).  In addition, the tarball contains these other packages:

  • Lighttpd Web Server
  • OpenSSH Secure Shell
  • Mediatomb UPnP Media Server
  • NTP Network Time Daemon
  • UNFS3 User-Space NFS Server
  • NFS-Utils NFS Server (requires kernel support)
  • RSync File Transfer Utility

Second Step – Enable SSH

If all goes well you should be able to telnet into your d-link:

Last login: Sat Feb 28 19:32:18 on console
localhost:~ jordan$ telnet 192.168.0.198
Trying 192.168.0.198…
Connected to 192.168.0.198.
Escape character is ‘^]’.
/ #

Notice it asks for no username or password? No good. This is a big security hole and we need to disable this and enable SSH. Since it is part of the tarball package fun_plug we only need to enable it.

At the telnet prompt type:

  1. pwconv
  2. passwd - (this changes root password, enter twice)
  3. usermod -s /ffp/bin/sh root – (this will change the default shell of the user. Current shell for root is ASH)
  4. login - (test to make sure you can login)
  5. store-passwd.sh
  6. chmod 766 /ffp/start/sshd.sh – (this allows everyone to read/execute the SSH startup script. It will also allow it to startup on boot).
  7. sh /ffp/start/sshd.sh start – (start the SSH service)

You should be able to SSH in. Try it now:

localhost:~ jordan$ ssh root@192.168.0.198
root@192.168.0.198’s password:
root@dlink-583ECB:~#

If you can, disable telnet by executing:

  1. /ffp/start/telnetd.sh stop
  2. chmod 644 /ffp/start/telnetd.sh

Installing Transmission

  1. ssh as root
  2. Type the command “cd /mnt/HD_a2” and hit <Enter>
    The prompt should change to “/mnt/HD_a2 #”
  3. Type the command “wget http://kylek.is-a-geek.org:31337/files/curl-7.18.1.tgz” and hit <Enter>
  4. Type the command “wget http://kylek.is-a-geek.org:31337/files/Transmission-2.04-1.tgz” and hit <Enter>
  5. Type the command “funpkg -i curl-7.18.1.tgz” and hit <Enter>
  6. Type the command “funpkg -i Transmission-2.04-1.tgz” and hit <Enter>
  7. Type the command “chmod a+x /ffp/start/transmission.sh;sh /ffp/start/transmission.sh start”
    There would be a message like starting transmission
  8. Type the command “sh /ffp/start/transmission.sh stop” and hit <Enter>
    There would be a message like stopping transmission
  9. Do not close the command prompt.

Updating the whitelist

In this section we would be adding your local lan IP range (A.B.C.*) to the whitelist. Assuming your NAS’s IP is 192.168.1.101, A.B.C.* would simply mean 192.168.1.* where the last group of number becomes asterix (*).

  1. Go back to the command prompt
  2. Type the command “vi /mnt/HD_a2/.transmission-daemon/settings.json” and hit <Enter>
  3. Edit the line with “rpc-whitelist”
  4. Type the following “,A.B.C.*”
    The entire line would read something like
    “rpc-whitelist”: “127.0.0.1,192.168.1.*”,

Starting Transmission

  1. Type the command “sh /ffp/start/transmission.sh start”
    There would be a message like starting transmission

Give it sometime for transmission to startup before proceeding to the next section.

Setting the download directory

  1. Type the command “su nobody -c “mkdir -p /mnt/HD_a2/transmission-downloads”“
  2. Type the command “transmission-remote 127.0.0.1 -w /mnt/HD_a2/transmission-downloads”
    There would be a message like success

It’s done! Direct your Internet browser to http://A.B.C.D:9091 for the transmission web user interface.

Post to Twitter Tweet This Post

Tags: DNS-323

Crontab Reference

Sep.29, 2010 in Build Automation, Linux Comments Off

I continually forget the format for a crontab entry… here’s a quick reference for those of you who do too!

Post to Twitter Tweet This Post

How to address TIBCO (Send HTTP Request) SSL Certificate Problems

May.28, 2010 in Tibco Comments Off

Integrating a TIBCO service with a 3rd Party REST api utilizing the “Send HTTP Request” palette option and receiving the following error?..

iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier
at iaik.security.ssl.f.f(Unknown Source)
at iaik.security.ssl.f.d(Unknown Source)
at iaik.security.ssl.e.c(Unknown Source)
at iaik.security.ssl.SSLTransport.startHandshake(Unknown Source)
at iaik.security.ssl.SSLTransport.a(Unknown Source)
at iaik.security.ssl.SSLTransport.renegotiate(Unknown Source)
at iaik.security.ssl.SSLSocket.renegotiate(Unknown Source)
at com.tibco.security.ssl.super.O0OO.doHandshake(SSLClientImpl.java:322)
at ...


Normally I was able to use a browser to export each level of the certificate hierarchy to the BW_GLOBAL_TRUSTED_CA_STORE and have everything function fine.  For some reason, the new integration didn’t present all required certification levels via the browser.  I think the underlying reason may have been the use of a self signed certificate in the certificate chain.

Verify return code: 19 (self signed certificate in certificate chain)

To get around this, I was able to use the following openssl command to identify the required certs and manually copied and pasted each certification to a new file in the BW_GLOBAL_TRUSTED_CA_STORE.  After that, running the service through designer worked just fine.

openssl s_client -showcerts -connect www.foobar.com:443

Post to Twitter Tweet This Post

Tags: SSL, Tibco

Grails and Oracle XMLDB (XMLType)

Apr.30, 2010 in Grails, Oracle Comments Off

Trying to integrate support for Oracle XMLDB in a grails app didn’t turn out to be as straightforward as you might think.  By putting the xmlparserv2.jar file in the $GRAILS_HOME/lib folder I was suddenly presented with SAX parse errors…

Luckily I stumbled across this post by Graeme Rocher who had a similar problem and identified how to resolve it…

Essentially to solve the problem, you need to make sure that library is only picked up at runtime, and not compile time.   You need to put the xmlparserv2.jar on the system classpath instead of the lib directory.

1) When running standalone from grails command line:
 grails -cp lib/runtime/xmlparserv2.jar run-app or modifying the CLASSPATH environment variable

2) When running from within a container, add the .jar to the lib folder
(ie: $TOMCAT_HOME/lib)

Another possible solution is documented here.

Post to Twitter Tweet This Post

Getting ‘YYYYMMDDhhmmss’ date format in a MS Windows script… yuck!

Mar.04, 2010 in General Comments Off

I had the painful experience of recently having to update some windows .bat scripts with some new functionality…. I’ve pleasantly re-affirmed why I DON’T WORK ON A WINDOWS PLATFORM!…

In any event, for any of you poor suckers that do and need access to datetime components within a batch, here’s an ugly solution… If you know of a better way.. I’m all ears!

echo %DATE% %TIME% > datefile.txt
REM parse Datefile (format mon MM-DD-YYYY (US date and time setting default))
For /F "tokens=2,3,4 delims=/ " %%a in (datefile.txt) do (set CurrentMonth=%%a&& set currentDate=%%b&& set /A currentYear=%%c)
For /F "tokens=3,4,5 delims=: " %%a in (datefile.txt) do (set CurrentHour=%%a&& set currentMinute=%%b&& set currentSecond=%%c)
echo Timstamp is: %CurrentYear%%CurrentMonth%%CurrentDate%%CurrentHour%%CurrentMinute%%CurrentSecond%

God help us all thats fugly!

Post to Twitter Tweet This Post

Tags: DOS, Windows

Mysql, Rmagick on Snow Leopard, Homebrew to the rescue!

Feb.27, 2010 in General Comments Off

Well after sitting on my install disks for a few months I finally figured I better upgrade my primary MacBook Pro. As expected, my rails projects and several other things did not function…. Rmagick and MySql were borked as well..

After spending several nights reinstalling Xcode, updating my macports, trying to compile from src to no avail I had someone recommend Homebrew to me. At first I figured.. meh.. another package manager that won’t work… suprisingly.. it did!.. Macports is garbage in comparison.. so to get to the good stuff.. here’s the steps to take if you find yourself in this situation!

1) Best to start clean.. first thing was to wipe the macports installs.


sudo port -f uninstall installed

sudo rm -rf /opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg \
~/.macports

2) Download and install the latest XCode development tools.. your DVD is probably out of date. Ensure that the optional components for command line development are installed (“Unix Development” in the Xcode 3.x installer). Also include the X11 items.

3) Rebooted and hold down ’6′ and ’4′ keys to switch to 64 bit mode… (by default snow leopard boots in 32 bit mode.. you can check this in the System Profiler).

4) Install homebrew
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz –strip 1 -C /usr/local
brew install git

5) Install mysql
brew install mysql
export ARCHFLAGS=”-arch i386 -arch x86_64″
gem install mysql — –with-mysql-dir=/usr/local \
–with-mysql-config=/usr/local/bin/mysql_config

6) Install imagemagick
brew install imagemagick

and finally:

7) sudo gem install rmagick

Post to Twitter Tweet This Post

Tags: Mac, MacPorts

Use your DNS-323 for Time Machine backups.

Jan.12, 2010 in Mac OSX Comments Off

If you don’t want to have to fork over the $$ to buy a time capsule want to make use of your existing DNS-323 hardware for backing up your Mac, here’s the steps to take.

1) Modify system preferences by executing this line in a terminal.

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

This will allow you to select the DNS as a backup device when you configure Time Machine.

2) You need to manually create a disk image that Time Machine can understand. The naming convention of this image is key. The name consists of the computers name and mac address of the local eno device without colons. (_.sparsebundle). Easiest way to find out the proper name is to attempt a backup after completing step 1 above. While this is attempting to run, use finder to browse the Volume (Volume_1 in my case) and write down the name of the file its trying to create. The filename will contain .tmp before the .sparebundle. Drop this from the filename and you have the complete name you need to use.

ie: gataca_0021413a0cce.tmp.sparsebundle -> gataca_0021413a0cce.sparsebundle

Open disk utility and create a new disk image on your local drive (you cannot create the image directly on the NFS drive) with the following options:

Format: Spare Bundle Disk Image
Partiions: No Partition Map
Encryption: None
Format: Mac OSX Extended Partition (Journaled)
Size – Maximum Size.. I choose Custom 250GB

After the image is created… manually copy it over to the root of your NFS volume.

3) Kick off the time machine backup and voila!

Now.. be prepared for the caveats of this solution mentioned here.

Post to Twitter Tweet This Post

Tags: DNS-323, Time Machine

SelectorGadget makes identifying page elements a breeze!

Jan.11, 2010 in Programming Comments Off

A recent railscast pointed me at a handy tool that has helped tremendously in speeding up my UI development efforts.  In past, I would use FireBug to highlight items on a page and identify the associated id / class.  This worked ok, but did not aid in narrowing down my selector in the efficient mannter this one does.  You can easily select/deselect fields on your page and dynamically generate your css selector.  Very cool!.. I encourage you to check it out!

Introducing SelectorGadget: point and click CSS selectors

Post to Twitter Tweet This Post

Tags: CSS, UI
« previous entries  
Next Page »
  • Tag Cloud

    Blackberry Capistrano certificate Configuration CSS DNS-323 DOS Dreamhost EMS Fedora firebug GMail Google Grails Groovy ie Java jQuery JSF Linux Mac Mac OSX MacPorts Memory Migrations Oracle PERL Rails Ruby Safari SOAP WebService Spring SSL Tibco Time Machine toolbar Trac UI video sony m2ts vlc VMWare Windows XMLDB

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Blogroll

    • A List Apart
    • Anassina
    • Just Be Kuz
    • Mashable
    • Poker Dreams Online
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Calendar

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Tags

    Blackberry Capistrano certificate Configuration CSS DNS-323 DOS Dreamhost EMS Fedora firebug GMail Google Grails Groovy ie Java jQuery JSF Linux Mac Mac OSX MacPorts Memory Migrations Oracle PERL Rails Ruby Safari SOAP WebService Spring SSL Tibco Time Machine toolbar Trac UI video sony m2ts vlc VMWare Windows XMLDB
  • Categories

    • Databases (5)
      • Oracle (4)
    • Dreamhost (1)
    • General (26)
    • Google (1)
    • Mobile (1)
    • OS (19)
      • Linux (13)
      • Mac OSX (5)
      • Windows (2)
    • Programming (28)
      • Build Automation (4)
      • Grails (1)
      • Java (9)
      • JBoss (1)
      • jQuery (1)
      • JSF (1)
      • MySQL (1)
      • PERL (1)
      • Rails (4)
      • Ruby (3)
    • Security (1)
    • Spring (1)
    • Tibco (4)
  • Recent Posts

    • from your old 8mm video to TinyUDF to mp4
    • Use Java to disable certificate validation in an HTTPS Connection
    • Enable ssh on your D-LINK DNS-323
    • Crontab Reference
    • How to address TIBCO (Send HTTP Request) SSL Certificate Problems


Green Web Hosting! This site hosted by DreamHost.

© 2007 Codedrop™ Weblog - SafiTech Theme

Full RSS - Comments RSS

Twitter links powered by Tweet This v1.8.1, a WordPress plugin for Twitter.