|
Nov, 5
2009
|
Using Bit.ly, prettySociable, and jQuery to share shortened links |
Read |
|
Nov, 5
2009
|
Using Bit.ly, prettySociable, and jQuery to share shortened links |
Read |
So I went ahead and made some script modifications to the already awesome PrettySociable jQuery plugin. These modifications allow for the use of your bit.ly account api to shorten urls.
By default, the prettySociable plugin takes the url supplied and submits that to the share service (twitter, facebook, etc.). I just made a simple change to allow for the developers to include a bit.ly api and username when calling $.prettySociable() by passing those in as parameters.
$.prettySociable({bitly_api: 'api here', bitly_user:'your username'});
If these options aren’t set, the plugin will use the default url. If they are, the plugin will automatically call the bit.ly api to shorten the url and use that shortened url instead.
I probably need to test a bit more, but here is the jquery.prettysociable.bitly.js script and here it is minified: jquery.prettysociable.bitly.min.js.
Links that helped me with this:
Bit.ly
PrettySociable plugin page
jQuery HowTo @blogspot
|
May, 1
2009
|
jQuery 1.3 cheat sheet wallpaper |
Read |
I went ahead and created a cheatsheet wallpaper for jQuery 1.3 using screenshots from http://oscarotero.com/jquery/
EDIT: One person commented about not being able to set up a different wallpaper for each space on OSX. Check out Spacesuit. This looks like a pretty good solution. Let me know if this helps out!
Click on a link below to download:

|
Feb, 20
2009
|
How to continue development from home, work and on the road using Dropbox, for FREE! |
Read |
Let’s say you have 3 different computers that you use (this is usually the case for people in IT or development). I will use me as an example, mostly because I can’t speak for anyone else and because I know the subject REALLY well. I have a work desktop (OS X Leopard), a personal laptop(OS X Leopard) and a home desktop(Windows Vista), not to mention, a couple virtual machines running windows on the 2 Macs. I’m also starting to teach myself PHP and continually developing my javascript and jQuery skills. The reason I mention PHP is because there is no way to serve up ASP.net pages yet on the Mac (yes, I know about mono. It isn’t quite there yet). Now, let’s say you want to seamlessly work on the same code on all 3 computers and virtual machines. Enter Dropbox.
Brief: Dropbox is an application that runs in the background on your computer (mac, linux, windows) and automatically syncs files when connected to the internet. If you’re doing web dev stuff, chances are you are connected online. Dropbox also creates a local folder on each computer to store the files that you are working on, etc.
Enter brain power:

Now, when you are writing code, editing images, or anything else, the code will automatically synchronize to each workstastion, allowing you to continue right where you left off, anywhere.
An example of how this helps: I was recently working on writing some Ubiquity commands so I set up a Ubiquity folder within Dropbox, subscribed to the [ubiquitycommand].js file in that folder on every computer I work on, and that was it! Now, whenever I make a change to those commands, the changes get synched to each computer and because Ubiquity is subscribed to the command on localhost, that change affects all computers.
This method also works extremely well when you have different operating system specific browsers that you would like to test with. It may seem a little daunting at first, but let me tell you, once it is set up, you’re done. No need to reconfigure anything. Best of all, Dropbox is FREE!
|
Feb, 19
2009
|
Add the jQuery library to Smugmug! |
Read |
Smugmug is great, or at least really promising as an e-commerce site for photographers who want their work easily viewable with a lot of exposure. Smugmug also uses the YUI javascript library for it’s UI effects and functionality. I haven’t learned how to use or manipulate the YUI library yet, but I do know a bit of jQuery. So when my brother-in-law wanted to redesign his Smugmug site, I started to wonder. How the hell am I going to load the jQuery library in there, or will I have to teach myself YUI?? I don’t have the time to learn a new library and, as it turns out, jQuery has the functionality to sit side by side with YUI built right in!
The solution was pretty simple. First, you need to edit the “Head” of the site.
<script src="http://ajax.googleapis.com/ ajax/libs/jquery/1.3.1/jquery.min.js" > </script> <script> var $j = jQuery.noConflict(); </script>
This code does two things.
It’s that easy. Now whenever you are writing your jQuery code, remember to use $j() for your jQuery calls instead of $(). More on jQuery’s noConflict() can be found here.
|
Feb, 14
2009
|
Launching MyNotes for Ubiquity |
Read |
Soooo, I’ve pretty much gotten MyNotes to a usable point in it’s development phase and am ready to start talking about it (and Ubiquity). It’s pretty difficult to figure out where to start. Well, let’s go with a brief description of ubiquity.
The best way I can think of to describe Ubiquity is, for all you Mac users, like Quicksilver for Firefox. A command line interface to control several different aspects of the web. A good video can be seen here.
Now, on to MyNotes.
I started working on MyNotes because the core of the MyNotes application has the basics for Ubiquity command line programming. My goals included:
I was able to use AJAX post-get methods in php to accomplish #’s 1 and 2.
Code Snippet below:
register: function(key,val) {
//register
var url="http://colddish.gmtaz.com/ubiquity/"+
"mynotes/notes.php";
jQuery.post(url, {op:"register",u: key, p:val},
function(data){
if(data.registerResponse == key){
if (!Application.prefs.has(key)){
Application.prefs.setValue(key, val);
Application.prefs.setValue("mynotes_user", key);
displayMessage("New account created for ""+key+"".");
}
else{
var new_key = Application.prefs.get(key);
Application.prefs.setValue("mynotes_user", key);
new_key.value = val;
displayMessage("Password set for ""+key+"".");
}
}
else
displayMessage("Username is already in use."
+" Please try again.");
}, "json");
Basically, I’m perfoming an AJAX post with jquery, passing in JSON data (username and password), and then storing that data in the application.prefs. I overcame the issue of knowing which password/username combo to use by creating a generic “mynotes” perfs key storing the active username and password.
Application.prefs.setValue("mynotes_user", key);
Then I can just get the value of the mynotes pref key to get the password associated with that account. I could try to just store JSON data as the value for the key and run a function to pull the appropriate data…but for some reason, I’m having trouble converting the value string to a JSON object.
To get this to fully function, I needed to create a php file (notes.php), which serves out the JSON data to ubiquity based on parameters posted by the AJAX call.
I would love to hear your thoughts on how to optimize this script as I’m just starting to teach myself javascript and jquery, coming from an asp .net environment.
Here is a link to the script page for MyNotes
|
Oct, 8
2007
|
Summing up my time…re: web design |
Read |
Well, I haven’t seen a better way of describing how my time is spent in regards to web design. Mostly because I’m a developer…
I found this here: http://www.i-marco.nl
The author states in his blog that he doesn’t agree with the CSS section, as anything can be done in CSS. I agree…I also think that the yellow should be much larger and so should the purple. I’ll bring down the fucking swearing section to compensate.
|
Dec, 12
2006
|
Welcome |
Read |
Ok, so I added a WordPress blog. I’m going to see what cool things I can think of to do with it. I think that WP is probably the best blogging engine out there (and I’ve tried many) so there are huge possibilities. I’ll keep you posted (both of you).
PS. I have a LOT of posts to catch up on so check back often…plus it makes me happy to see people checking my site.