Categories
post

LESS CSS Strings

I saw a tweet about LESS CSS today that I was able to answer with some simple trials. The question came from @funkatron: “Can any LESS.js nerds tell me how I could use a variable to set a base path for various `url()`s? like `background: url(@BASEPATH/foo.png)`”

The solution was quite simple after some trial and error.

@BASEPATH: ‘/PATH/TO/BASE’;
#element {
url({@BASEPATH}/foo.png);
}

Turns out it doesn’t work in lessc. I use PHP Less CSS. (plessc)

Categories
post

jQuery Panel Slide Out

I was looking for some code to do slide out panels and found http://www.building58.com/examples/tabSlideOut.html

I created a patch that will allow you load the content through AJAX, instead of statically in the HTML.

In the HTML you need to add another element (DIV) that wraps the content to be loaded. Change the example on the page above with the two lines left aligned below.

     <div class=”slide-out-div”>
          <a class=”handle” href=”http://link-for-non-js-users.html”>Content</a>
          <h3>Contact me</h3>
<div id=”CONTENT_TO_REPLACE”>
          <p>Thanks for checking out my jQuery plugin, I hope you find this useful.</p>
          <p>This can be a form to submit feedback, or contact info</p>
</div>
     </div>

And then in the initialization step:

<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js” type=”text/javascript”></script>
<script src=”http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js”></script>

     <script type=”text/javascript”>
      $(function(){
           $(‘.slide-out-div’).tabSlideOut({
                tabHandle: ‘.handle’, //class of the element that will become your tab
                pathToTabImage: ‘images/contact_tab.gif’, //path to the image for the tab //Optionally can be set using css
                imageHeight: ‘122px’, //height of tab image //Optionally can be set using css
                imageWidth: ’40px’, //width of tab image //Optionally can be set using css
      tabLocation: ‘left’, //side of screen where tab lives, top, right, bottom, or left
                speed: 300, //speed of animation
                action: ‘click’, //options: ‘click’ or ‘hover’, action to trigger animation
                topPos: ‘200px’, //position from the top/ use if tabLocation is left or right
                leftPos: ’20px’, //position from left/ use if tabLocation is bottom or top
                fixedPosition: false, //options: true makes it stick(fixed position) on scroll
‘contentURL’: ‘http://URL_TO_YOUR_CONTENT’,
‘contentDiv’: ‘CONTENT_TO_REPLACE’ //This is the id of the content box above in the HTML
          });
});

      </script>

Below is the patch to v1.3

— jquery.tabSlideOut.v1.3.js 2009-09-21 00:00:53.000000000 -0400
+++ jquery.tabSlideOut.ajax.js 2011-02-25 08:38:47.000000000 -0500
@@ -35,11 +35,19 @@
pathToTabImage: null,
imageHeight: null,
imageWidth: null,
– onLoadSlideOut: false
+ onLoadSlideOut: false,
+ contentLoaded: false,
+ contentURL: null,
+ contentDiv: ”
}, callerSettings||{});

settings.tabHandle = $(settings.tabHandle);
var obj = this;
+
+ if (settings.contentURL) {
+ settings.contentDiv = $(settings.contentDiv);
+ }
+
if (settings.fixedPosition === true) {
settings.positioning = ‘fixed’;
} else {
@@ -142,6 +150,10 @@
};

var slideOut = function() {
+
+ if (settings.contentURL && (settings.contentLoaded === false)) {
+ settings.contentDiv.load(settings.contentURL, function() { settings.contentLoaded = true; });
+ }

if (settings.tabLocation == ‘top’) {
obj.animate({top:’-3px’}, settings.speed).addClass(‘open’);

Categories
status

Dinner with wife and father-in-law. Good…

Dinner with wife and father-in-law. Good times 🙂

Categories
post

Mobile Website Design

What is mobile web design today? Is there a standard? Or is it just about smaller pages with less images? I don’t do mobile sites very often. With smart phones today, I personally expect the full version. I know I will have to zoom in and out, but I am usually looking for specific information. Do people really do much shopping on mobile?

So many questions. Time will tell.

Categories
status

Git is back in my life to stay this time…

Git is back in my life to stay this time. I have started and stopped using GIT on the same project numerous times. Each time I felt I was using it incorrectly or effectively and in the end I would just stop.

I have picked it back up, and this time started using a script that would take my ‘git log’ entries and put them into MySQL. I then created a report for my boss to be able to see every change I make.

I am the only “tech” here, so nobody has held me accountable in the past. I need to do it myself.

Categories
Bowling

Storm Victory Road Bowling Ball Review


Click to Enlarge

Pin to PAP(4 1/2″ over 0″ up) – 3 1/2″
Mass Bias Position – N/A
Balance Hole – 3/4″ x 1″ on PAP
PSA Layout – 3 1/2″ x 4 5/8″, 2 7/8″ pin buffer

Surface Preparation – Out of Box (1500 Grit Polish)

Wow, the [bowlingball value=”9109″/] is an amazing bowling ball. The length and hook on the backend were fantastic. This bowling ball pounded the pocket and exploded the rack.

It was snappy on the backend, but not “jumpy”. It had a predictable backend snap.

The pearlized coverstock gives the ball length, while the 1500 grit polish helped give it backend.

Use this bowling ball to travel down Victory Road.

But the [bowlingball value=”9109″/] at bowlingball.com for [bowlingball value=”9109,price”/].  While shopping, pick up a new pair of bowling shoes.  There are some fantastic values available now for cheap bowling shoes.

Categories
Bowling

The Storm Marvel Bowling Ball Review


Click to Enlarge

Pin to PAP(4 1/2″ over 0″ up) – 4″
Mass Bias Position – N/A
Balance Hole – 3/4″ x 1″ on PAP
PSA Layout – 4″ x 4″, 2″ pin buffer

Surface Preparation – Out of Box (2000 Grit Abralon)

The [bowlingball value=”9108″/] has a very smooth overall roll. It didn’t seem “jumpy” at all, which helps me feel more in control. I have always had an affinity to symmetrical cores for this reason.

In the video, I did have a couple of bad shots, but you can see that the ball helped me recover from them very well.

The colors are also pleasing to my eye. I am a fan of blues, and this ball has many shades of blue.  Buy at bowlingball.com for [bowlingball value=”9108,price”/].

While shopping at bowlingball.com, you may also consider picking up some bowling shoes.  There are some great deals going on right now on some cheap bowling shoes.

Categories
Programmer's Mindset

APC Configuration Hell

Note to self: Know where your configuration files are.

I have been fighting an APC out of memory/100% fragmentation nightmare.  I kept tweeking settings in /etc/php.ini and nothing seemed to be fixing the problem.  Sure, gracefully restarting Apache will appear to fix the issue at the moment, but then it returned.

I started looking at the Runtime settings in apc.php and realized that nothing I had set really changed anything.  Turns out, apc by default put its config in /etc/php.d/apc.ini.  Sure, I would set them in php.ini and then they were overwritten in apc.ini.  ARGH!!!!

Found and fixed… YAY!

Categories
Bowling

Storm Virtory Road Bowling Ball

[bowlingball value=”9109,i150″/]

Storm is releasing a new bowling ball soon.  More information to come, but the hype so far is that it builds on the Storm Hy-Road’s technology.

[bowlingball value=”9109,longdesc”/]

The [bowlingball value=”9109″/] is currently selling for [bowlingball value=”9109,price”/] and rates a [bowlingball value=”9109,ps”/].

Categories
Bowling

Storm Marvel Bowling Ball

[bowlingball value=”9108,i150″/]

A new bowling ball is coming from Storm.  There is not a lot of information available for it yet.  The picture looks pretty cool, but we will see how it reacts.

[bowlingball value=”9108,longdesc”/]

The [bowlingball value=”9108″/] is currently selling for [bowlingball value=”9108,price”/] and rates a [bowlingball value=”9108,ps”/].