Tuesday, July 12, 2016

Cygwin and Laravel

I played with getting cygwin to run Laravel and the l5scaffold. Here are the additions you need to install in cygwin
  1. php, git, sqlite3, and curl.
  2. The following php extensions.
    1. json
    2. phar
    3. mbstring
    4. zip
    5. tokenizer
    6. pdo-sqlite
    7. ctype
Don't if anyone else will ever, need this, but there ya go.

Sunday, May 29, 2016

Photo panoramas

I've used and liked Hugin before and blogger about it here. I recently downloaded the latest version and I just couldn't figure out how to use it. My bad no doubt, but after an hour getting no traction using the user's guide, I gave up and looked for something else. autostitch was the answer. Three clicks and I was done.

Thursday, March 24, 2016

Audacity create labels

Geez I like Audacity. I recently needed to put track markers in a long "song" and it's built right in. Choose Analyze -> Regular Interval Tracks. I like ten minutes and the number after the "Label":

Wednesday, January 27, 2016

How to become a security professional

Well, really, here are some useful links.

http://www.darkreading.com/careers-and-people/why-cybersecurity-certifications-matter----or-not/d/d-id/1324004?_mc=RSS_DR_EDT
http://www.zdnet.com/article/getting-started-with-a-career-in-cybersecurity/
http://www.troyhunt.com/2015/09/troys-ultimate-list-of-security-links.html
https://www.cybrary.it/course/advanced-penetration-testing/

Friday, January 15, 2016

Rockbox Rocks

I wanted to put a bunch of music on a Sansa Clip+ or Sport Clip and both seriously messed up the order of the tracks. First, ID3 v1 doesn't support more than 255 tracks, which wasn't enough. I used mutagen (https://bitbucket.org/lazka/mutagen) to make sure the tracks were numbered correctly via this script
TOTAL=`ls -1 | wc -l | sed -e "s/ //g"`
COUNT=1

for i in *
do
    mid3v2 -T "$COUNT/$TOTAL" "$i"
    mid3v2 --delete-v1 "$i"
    COUNT=$((COUNT+1))
done
The downside with mutagen is that it always converts to ID3 v2.4 that many players won't recognize. Nicely, with mp3tag (http://www.mp3tag.de/en/) one can choose the version desired, and there is an automated track numbering tool. Still no joy. As best as I can tell, the Sansa clips have a bug or two that make the whole effort futile. Enter Rockbox (http://www.rockbox.org/). I had no idea there was such a thing as free music player firmware. Cool! I downloaded the installer and the necessary Sansa firmware from http://forums.sandisk.com/t5/Sansa-Clip-Sansa-Clip/Sansa-Clip-Firmware-Update-01-02-16/td-p/150227, ran the installer, and it worked! So I did what I always do: donated to the mp3tag and Rockbox projects. The Clip Sport is not currently supported by Rockbox...
I learned far more about mp3 tagging than I ever wanted to, so thought I'd pass a little of the learning on.

Monday, October 26, 2015

Updating crashplan on a linux system

This failed for me when trying to move from crashplan 4.3.3 to 4.4.1. It took me a while to figure out why. I should have looked in /usr/local/crashplan/logs and seen logs named along the lines of "upgrade.1435726800441.1445830017698.log". Looking in there shows:

Sun Oct 25 21:26:59 MDT 2015 : Stopping using /etc/init.d/crashplan...
Stopping CrashPlan Engine ... OK
Sun Oct 25 21:27:09 MDT 2015 : Ensuring the UpgradeUI is not running.
Sun Oct 25 21:27:09 MDT 2015 : UpgradeUI is shut down.
Sun Oct 25 21:27:09 MDT 2015 : JAVACOMMON is set: /usr/bin/java
Sun Oct 25 21:27:10 MDT 2015 : Current Java Version: 1.6
Sun Oct 25 21:27:10 MDT 2015 : This client requires one of these JREs: 1.7 1.8.  Exiting upgrade
Sun Oct 25 21:27:10 MDT 2015 : Starting using /etc/init.d/crashplan...
Starting CrashPlan Engine ... Using standard startup
OK

What I did was run "bash -x update.sh" in the most recent directory in /usr/local/crashplan/upgrade and saw the same error. So, time to upgrade my jre on this debian system. I issued the apt-get:

$ sudo apt-get remove openjdk-6-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gcj-4.7-base gcj-4.7-jre gcj-4.7-jre-headless gcj-4.7-jre-lib gcj-jre
  gcj-jre-headless libgcj13 libgcj13-awt openjdk-7-jre openjdk-7-jre-headless
Suggested packages:
  fastjar gcj-4.7-jdk gcj-jdk libgcj13-dbg icedtea-7-plugin
  icedtea-7-jre-jamvm sun-java6-fonts fonts-ipafont-gothic
  fonts-ipafont-mincho ttf-wqy-microhei ttf-wqy-zenhei ttf-indic-fonts
The following packages will be REMOVED:
  default-jre icedtea-netx openjdk-6-jdk openjdk-6-jre
The following NEW packages will be installed:
  gcj-4.7-base gcj-4.7-jre gcj-4.7-jre-headless gcj-4.7-jre-lib gcj-jre
  gcj-jre-headless libgcj13 libgcj13-awt openjdk-7-jre openjdk-7-jre-headless
0 upgraded, 10 newly installed, 4 to remove and 7 not upgraded.
Need to get 66.4 MB of archives.
After this operation, 105 MB of additional disk space will be used.

and low and behold, it knew enough to install openjdk-7-jre. Nice! But that wasn't enough, there were other Java 1.6 runtimes lurking:

dpkg -l | grep -i openjdk
ii  icedtea-6-jre-cacao:amd64             6b36-1.13.8-1~deb7u1               amd64        Alternative JVM for OpenJDK, using Cacao
ii  icedtea-6-jre-jamvm:amd64             6b36-1.13.8-1~deb7u1               amd64        Alternative JVM for OpenJDK, using JamVM
ii  openjdk-6-jre-headless:amd64          6b36-1.13.8-1~deb7u1               amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-6-jre-lib                     6b36-1.13.8-1~deb7u1               all          OpenJDK Java runtime (architecture independent libraries)
ii  openjdk-7-jre:amd64                   7u79-2.5.6-1~deb7u1                amd64        OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-7-jre-headless:amd64          7u79-2.5.6-1~deb7u1                amd64        OpenJDK Java runtime, using Hotspot JIT (headless)

So, let's get to removing those.

$ sudo apt-get remove icedtea-6-jre-cacao
$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  icedtea-netx-common libice-dev libpthread-stubs0 libpthread-stubs0-dev
  libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev
  libxt-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 0 newly installed, 16 to remove and 7 not upgraded.
After this operation, 20.2 MB disk space will be freed.
$ sudo apt-get remove icedtea-6-jre-jamvm
$ sudo apt-get remove openjdk-6-jre-headless
$ sudo apt-get purge openjdk-6-jre-headless

Now, we're somewhere. I was then able to complete an install via cd /usr/local/crashplan/upgrade/1435726800441.1445828290338" (your directory name will be different), and "bash -x upgrade.sh". Morals: look for log files, it might save you a little time.

Tuesday, October 20, 2015

RoR install on OS X without sudo

There is plenty of advice out there as to how to do this, most of it wrong or too complicated. The short story is one can install everything necessary without sudo, in your home directory. First, make sure your Xcode is ready to go:

xcode-select --install

Then install rails, but only after a successful nokogiri install:

gem install --user-install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2
gem install --user-install rails

You'll need to fix up your PATH variable to point to what you installed:

export PATH=/Users/beatys/.gem/ruby/2.0.0/bin:$PATH

Now you can create rails apps, again taking care to worry about nokogiri first:

rails new Demo --skip-bundle
cd Demo
bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2
bundle install --path vendor/bundle

While it shouldn't be this complex, here we are.