Noisy Cricket – Part One


cricketA couple weeks ago, I posted about building the Noisy Cricket, a small 1 watt solid-state guitar amp. Earlier this week, I ordered the parts to build one. The parts are coming from Mammoth Electronics . They have a good selection of parts and good prices as well. Their target demographic is diy pedal makers, so they had everything I needed.

Unfortunately, the order didn’t ship in time to make it here before the holiday weekend. I looks like sometime Tuesday and I will post up pictures of all the goodies when I get them.

Advertisements

Adobe CQ – Toggle Preview


Adobe-CQ-264x300The coolest little tip/trick I’ve used in CQ in a while is the Toggle Preview trick that I came across a while ago.  This is not mine and I can’t for the life of me find where I picked it up from, so I apologize for not giving credit where credit is due.  I will update this when I find it.

Back to our program:  The Toggle Preview – When you are on your author instance, making many fine content edits, you might say to yourself, “Self?  I wish I could really see what this page looks like without having to deploy this page to dev/stage/whatever just to see if the CSS it rendering correctly.”  Yes, this is the lament of many CQ developers/designers.  Until today.

With this spectacular offer, you will get a a bookmark that will allow you to toggle the WCM mode  (enables/disabled).  What you get when the WCM mode is enables is nothing.  No sidekick and no left-nav DAM interface.  Just your page.  Here’s how it works…

  1. Create a new bookmark in your browser(s) of choice.  Give any name you like (I chose ‘Toggle Preview’ because I l like to live on the edge).
  2. Paste the code below into path.
  3. Navigate to your CQ Author instance and fire up your Experience Manager and find a page
  4. Take notice that your Sidekick and left-nav DAM interface are visible.
  5. Click on your new Toggle Preview shortcut
  6. Astonish your coworkers with your new sorcerous powers

Here’s the code.  Grab everything between the “===”:
=========================================

javascript:(function(){var a=”wcmmode=disabled”;var b=”/cf”;var c=function(a,b,c){var d=a;if(b.length!=0&&!(b.length==1&&b[0]==””)){d+=”?”+b.join(“&”)}d+=c;return d};var d=””;var e=[];if(window.location.search.substring(1)!=””){e=window.location.search.substring(1).split(“&”)}var f=””;if(window.location.pathname!=b){f=b+”#”+window.location.pathname;if(e.indexOf(a)!=-1){e.pop(a)}d=window.location.hash}else{f=window.frames[1].location.pathname;if(window.frames[1].location.search.substring(1)!=””){e=window.frames[1].location.search.substring(1).split(“&”)}if(e.indexOf(a)==-1){e.push(a)}d=window.frames[1].location.hash}var g=c(f,e,d);window.location=g})();

=========================================

Unfortunately, like other cool things, this will not work in CQ5.4 or Internet Explorer.

Please let me know if you have any issues with this.  I’ll be happy to help, if I can.

Adobe CQ – Auto Formatting in CRXDE Lite


Adobe-CQ-264x300A nice, little touch to make the world a better place…

This morning, I happened upon a post from Darren on the LiveCycle Development Kit Blog.  He describes a quick technique to format the code in CRXDE Lite by simply highlighting a block of code and clicking SHIFT+CTRL.  Imaging my surprise when it actually worked!!! He mentions that it works in Chrome, Firefox and IE but I have yet to test that.  My initial test was on CRX v2.4.22

However, I did test it with the CRX v2.2.0.68 and it does not work.  ;(

Most of us where I work have stopped using CRXDE Lite for the primary development IDE for out web apps since we worked out the integration with Eclipse.  However, I still find myself back in CRXDE Lite from time to time and this is a nice way for me to keep it tidy.

Thanks Darren!

Adobe CQ-Where The OSGi Configurations Live


Adobe-CQ-264x300Have you ever laid awake, staring at the ceiling, wondering where OSGi stores it configurations?  It’s the question that has plagued mankind for centuries.  Well, Jayen over at CQ-OPS has published a quick write-up on where these configurations live and you should give it a read.  However, I will quickly sum up:

Take for instance the Adobe CQ Launches Event Handler (picked at random).  If you go to the console and edit this bundle, you will see at the bottom the PID assigned is the namespace: “com.adobe.cq.wcm.launches.impl.LaunchesEventHandler”. The path to the config file on the file system generally follows this format with a prefix of “…/crx-quickstart/launchpad/config“.  So, for our example above, the path would be:
…/crx-quickstart/launchpad/config/com/adobe/cq/wcm/launches/impl/LaunchesEventHandler.config“.

Now you can sleep better tonight knowing that one of mankind’s greatest mysteries has been solved. 

 

Linux Noobie – App Installation (Java Install Redux)


penguin-ubuntuSince burning my ship and switching between Mac and Linux (for work… At home, it’s straight-up Linux), I have found a much easier way of making software manageable for me.  This means its manageable BY me but that’s ok because with some apps, I need to control versioning.  This works with apps that are downloadable, don’t have a million and one dependencies and meant to run independently.

Previously, as most Linux users should, I used the package management system.  This is still a good practice, making installation and removal easy, not to mention patching/updates/upgrades/etc.  However, my local Ubuntu as a deathgrip on Java v7.  I don’t have anything against JDK7 and would prefer to use it.  However, my primary CMS is locked into JDK6, and JDK7 makes it very sad.

What I generally do for things like the JDK, Maven, MySQL, etc. is to put it through the Noobie Initializer of Dooooom:

  1. Unpack the tar/zip/suitcase to my /opt folder
  2. rename the folder to “<appname>-<version number>
  3. create a symbolic link to the app-version folder of my choosing
  4. add “export <app short name>_HOME=/opt/<symlink>” to my .bashrc
  5. add “…:$<app short name>_HOME/bin” to my path in .bashrc

This allows me the flexibility to swap out different versions so that I can evaluate new releases with my software easily without wrestling with the package mangler.  So far, I haven’t had any adverse issues with this process and the only caveat would be that I need to proactively seek out updates that may occur.  Since my current production/prod-like apps use the current version, I am slow to move to the next version without compelling, motivating factors like death, dismemberment or hunger.  However, I still check to see where I am at at least once a month or sooner if the mood strikes me.

Here’s a list of what I run with this method:

  • maven
  • vault
  • java
  • Sublime
  • groovy
  • grails
  • idea
  • jmeter
  • mysql
  • mongo

 

Linux Noobie – IPTables


iptablesI know I’m a muppet, you don’t HAVE to tell me…

(This will just be a quick and dirty touch upon some useful commands to completely FUBAR your IPTables configuration.  I’m NOT kidding.)

Yesterday, I was provided an opportunity to bask in the glory of IPTables, the defacto standard Linux firewall solution.  Our system engineer stood up a RHEL 6 server and then copied over a ton of data from our production CMS so we could do some performance testing.  This CMS has replication jobs that need to be reconfigured but that can only happen while it’s running.  In short, he erected an IPTables force-field for the server until I could reconfig the replication jobs.  We have a system and it’s worked great… until yesterday.  It seems that even System Admins like to take vacations.  So, I was on my own.  

The CMS/Content/Data was copied over successfully and the IPTables configured to prevent OUTPUT on ports (I’m making these up but you will get the point) 5805, 5806, and 80.  I have to get these turned off and the only person to help is Google.  Well, as with many things Google it’s either feast or famine and I was feasting.  There’s tons of great info on IPTables but I found one of my favorite sites, nixCraft, to be very helpful.  Here’s how I solved the problem:

First, I needed to be able to see what I was working with.  This was accomplished by listing out the IPTables configuration:

sudo iptables -L

This provided me with the following:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- anywhere anywhere tcp dpt:5805
DROP tcp -- anywhere anywhere tcp dpt:5806
DROP tcp -- anywhere anywhere tcp dpt:http

So, I did some digging and found this article on nixCraft which is really good considering books have been written on the subject.  Since I knew that the admin created these entries, I just needed to drop them.  I found that you can reference these entries with line numbers and also limit the listing to specific sections.  Since I want line numbers and only the OUTPUT section, I put in this:

sudo iptables -L OUTPUT --line-numbers

and I got this back:

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
1 DROP tcp -- anywhere anywhere tcp dpt:5805
2 DROP tcp -- anywhere anywhere tcp dpt:5806
3 DROP tcp -- anywhere anywhere tcp dpt:http

Now, to delete them, I used this command:

sudo iptables -D INPUT 1

The listing after this looked like:

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
1 DROP tcp -- anywhere anywhere tcp dpt:5806
2 DROP tcp -- anywhere anywhere tcp dpt:http

Finally, rinse and repeat and then Save the config as follows:

sudo service iptables save

Just to make sure, I restarted IPTables service as such and then views the listing:

sudo service iptables restart

Everything looks the way I left it.  Now to test it.  I used telnet to call out to an external server listing on 5306 and it responded so I know that the firewall is allowing the traffic.

 

Fireguts: Rewired


hmmmYeah, I had to rewire the LP.  To summarize, I had the bridge and neck pickups switched around at the the selector switch, and while attempting some minor repairs, messed up the switch.  Well, that is done but I did learn a few things about working with LPs.

First thing you need to do is your wiring.  Since the wires go through small channels between the switch and the control cavity, you need to get them in place first.  This I did.

Next, give yourself some extra slack on the wires so if you make mistakes, you can easily fix them.  I did NOT do this and paid the price of having to take everything off.  I had to remove the pickups, and the wires.  I tried to use one old wire to guide in a couple new ones.  It’s a long story but I ended up making things worse, so I just bit the bullet, took off the strings, the pickups and rewired the whole bloody thing.  I feel better about it.

I also revisited the grounding wire for the tail piece bushing.  I tucked it in real good.  I know I’m getting continuity but I still have a buzz.  Maybe it’s the switch.  This is burgling my chi.  It might also be the pickups that cost $10.00 for both.  Either way, Seymour Duncan’s will find a new home here.  Just not today.

Finally, I wired up the Sprague Orange Drops and tested the output.  Everything is wired correctly with no scratchy pots or switch.  And yes…. the switch is wired correctly now.

Tonight, I will restring it and do another setup on it.  Maybe I’ll post a clip here.