When working on a large codebase there are often services, utility methods, endpoints, etc that are shared across the whole application. When a reference to one of these is needed within a module, we will often alias the global namespace to a variable to easy referencing. Dependency injection makes this easier and more maintainable.
Check out the github page for more details and code examples
ko.public - A New Way for Your Knockout.js Modules to Talk
As developers we know that we should be keeping out code modular. That means if you’re using a library like Knockoutjs you shouldn’t put all your code in a single viewmodel.
So what if you need those modules to be able to communicate with each other? Typically you would use a PubSub type of structure to allow cross module communication but what if there was an easier way?
As I was developing in Knockout I thought, what if there was a way for me to specify a value on 2 different viewmodels that used the same observable value? So when one is updated, the other would get that message and automatically update and push changes to the view.
Well, it turns out it is easier than I thought. A few lines of code later and I had it. I’m calling the solution ko.public, and it’s available on GitHub under the MIT license. So go nuts, and enjoy!
Example of Usage
Q:I cannot figure out how to drag the Reveal Password link into bookmarks...
Sometimes, depending on your browser and settings, you can’t drag the bookmark. In that case you can right click on it and add it to your favorites from that menu. In internet explorer I believe you click “Add to Favorites” from the right click menu.
A different take on Chromecast
So Google recently announced a sleek new product known as Chromecast and everyone is talking about it. The device resembled a USB thumb drive, but it plugs into your HD TV instead of your computer. The idea is that when you find a video that you want to watch, or any other piece of content that you want to consume, you can do so on your television using Chromecast. So you have a little button on your youtube app that, when pressed, sends a signal to your Chromecast, and the Chromecast goes out and streams that content down to your TV.
The idea is simple and elegant, and it got me thinking.
What about games?
Would it be possible to take this same process and use it to turn the Chromecast into a basic (web based) game device?
Let me break this down for you. Could we not have a mobile app that would present a gallery of games to play and use Chromecast to display those games on your TV? Your mobile device would then display virtual controls (or use the accelerometer) and the input could be piped over to the Chromecast via a websockets connection. You could even go as far as pairing a hardware controller to your phone via Bluetooth for a truly tactile experience.
I’m really excited to see what comes out of this little $35 device, and the API that goes along with it.
Just posted my second particle animation up on CodePen and I really like how it came out. I added a lot more “life” to the system, making the little particles move on their own in a more cell-like fashion. Hope you enjoy it!
Oh, and Chrome is pretty much required for this to look right. :-)
Kill Skype Home - Going Open Source!
I have really enjoyed all the comments and positive feedback I’ve gotten about Kill Skype Home (KSH)! A day or two after releasing KSH I started receiving requests to publish the source. To be honest I had mixed feelings about it. On one hand, I have nothing to hide, and I want everyone to feel comfortable using KSH on their computer. On the other hand I spent a fair amount of time figuring out what I thought would be the best way for this program to work, and coding it.
So I started to research OS licenses, and what they meant. So I’m going to give this whole “Open Source” thing a shot. I’m releasing KSH under the GPL and starting a sourceforge project. Seeing as how I have no experience with sourceforge, I’ll ask that you bear with me as I figure it all out.
I’d love to hear your comments about this move and general thoughts on open source vs closed source projects.
Everyone is a genius. But if you judge a fish on its ability to climb a tree, it will live its whole life believing it is stupid.
Kill Skype Home (KSH) - Get rid of that annoying “Skype Home” popup
With the new Skype update has come an annoying little window called Skype Home that pops up automatically when Skype starts. I don’t like things that serve no purpose and I don’t like things that pop up automatically. Now, when you combine the two, it’s just too much. So, of course, I had to write an app that fixes this issue. This script is designed to start with windows, kill the Skype Home window when it finds it, then closes itself so it no longer uses any system resources. For those of you who don’t leave skype running all the time, I’ve added “Persistent mode” which keeps KSH running and watching for Skype Home to pop up.
- Kills the Skype Home window automatically
- Minimizes Skype to the system tray when it starts
- No installation required
- Can hide KSH tray icon while running
- Tiny 300KB file size
- No dependencies required (no .NET framework)
Setting up KSH:
- Download the KillSkypeHome.exe file and run it
- If the “Open File - Security Warning” window comes up, uncheck the box called “Always ask before opening this file”, and click [Run].
- Right click on the icon down in the system tray and select “Start with Windows” (if you want KSH to run automatically when you startup)
- You’re done! Restart your computer and watch the Skype Home window disappear as soon as it pops up.
** IMPORTANT: Skype must be in “Compact View” for this to work. To use “Compact View” simply click [View] then select [Compact View] from the menu **
- UPDATE v1.0 - 09/22/2011 - No new features, this update just improves performance… imagine that! ;-)
- UPDATE v0.9 - 09/08/2011 - Can now hide the KSH tray icon by pressing CTRL + F11. Also fixed a minor bug with minimizing Skype.
- UPDATE v0.8 - 09/05/2011 - Removed “Nuke Skype Home” because it was only effective on 5.3, not 5.5. Fixed bug affecting users with a period in their Windows username. Now closes Skype Home and minimizes Skype to tray faster.
- UPDATE v0.7 - 09/01/2011 - Will now minimize Skype to tray even if Skype Home is not found. Added option to “Nuke Skype Home”, which alters a database to permanently remove the Skype Home window.
- UPDATE v0.6 - 08/23/2011 - Now minimizes Skype to tray. Better persistent mode functionality.
- UPDATE v0.5 - 08/16/2011 - Added support for killing Skype Home window in localized versions of Skype. Changed icon because the red icon was confusing when running in persistent mode.
- UPDATE v0.4 - 08/11/2011 - Added an option to keep KillSkypeHome running (persistent mode). Also added an automatically generated config file to handle user preferences.
- UPDATE v0.3 - 08/04/2011 - Added an option to minimize the main Skype window after Skype Home is closed.
Reveal Passwords gets full Internet Explorer 6+ support
Hello, Just wanted to post a quick update to let everyone know that I have updated Reveal Passwords with full IE 6+ support. It took a fair amount of trial and error, but I’m very happy with the end product. So go check it out and update your Bookmarks!
Reveal hidden passwords in all major browsers
Do you, or someone you know, use the browser’s built in ability to remember passwords to the point that you/they forget what the password actually is? Do you feel held hostage by your browser, praying each night that tomorrow the magical dots will still be there to let you into your mail account? Those little dots that mock you, declaring with each page visit “I know your password, but I’m not going to tell YOU what it is!” Well my friend, the day of reckoning has come!
Ok, so I went a little overboard there. I’ve written a bookmarklet that will allow you to reveal what is hidden behind your browser’s password mask. Simply drag the following link into your bookmarks. Then anytime you see a password field, you can click your bookmark to reveal the secret password beneath.
This script has been tested in:
- Internet Explorer 6+
- Firefox 3.6
- Opera 11
I love the smell of Pandora in the morning
If you are like me, you use your phone as an alarm clock. It’s convenient because no matter where you are, it’s always with you…ready to yank you from your sweet slumber. Today I’ll show you how to make a very basic alarm clock for Android using Pandora and Tasker. It is, in my humble opinion, absolutely the best way to wake up in the morning. Ok, fine, the smell of bacon and eggs would be better. So if anyone can figure out a way to rig up an alarm clock that starts making you breakfast, please contact me right away!
Read on for all the dirty details…
Normally a cell phone alarm clock will wake you up with some horrendously annoying sound. Yes, true, most phones will let you pick a music ring tone or even an mp3 to wake up to. But that simply ruins whatever song you pick. No matter what song you choose, it will ever after be associated with the awful feeling of morning grogginess.
Below I’ve listed a very basic Tasker alarm profile that will simply start your Pandora app at the designated time, and close the app when the profile exits. Remember, profile exit events are triggered when the condition is no longer true, so if you want Pandora to stop at 7:00 AM, you need to set your exit event for 6:59 AM. I then set my phones annoying “beep beep beep” alarm for 7:00 AM so that in case I sleep heavily on a particular morning, I will still be forced out of bed.
Please note, due to changes in the Android platform, phones running 2.2 or higher will NOT be able to kill the Pandora app by merely performing a “Kill App” task. This profile gets around the problem by pausing the music, going to the home screen, and then killing the app. I’ve found this to be very reliable but please let me know if you have any trouble with it.
- PROFILE: Pandora Alarm
Have a better way to wake up in the morning? Tell me about it in the comments!
Wake up my phone in an emergency!
Have you ever missed an important call because your phone was on silent? Or been reluctant to turn your phone to silent because you were afraid you’d miss an important call? NO LONGER! With Tasker (for Android phones only) and a few scripts I wrote, you can put those worries to rest.
Read on for all the instructions…
This idea originally came from a Lifehacker post that I read. However I tried to install their scripts on my phone to no avail. So I did what any developer would do. I wrote my own. The key difference between MY solution, and the one feature by Lifehacker is that mine doesn’t require you to list specific phone numbers that receive this privilege. It will work for anyone in your phone’s favorites list.
SO HOW DOES IT WORK?
When you get a missed call from someone on your favorites list while your phone is on silent, your phone will automatically send a text message to the number that called. This text message will instruct the caller to send you a text message that says “911” and then try their call again. When your phone receives the 911 text message, it will take your phone off silent. Your phone will remain un-silenced until you view the text message.
HOW DO I SET IT UP?
In order for this to work, you need to be running an Android phone and you will need to acquire the Tasker application. Once you are running Tasker, all you need to do is download the following tasks and profiles, and import them into Tasker by tapping your option key at the main Tasker screen and selecting “Profile Data”. Then you will need to choose “Import One Profile” or “Import One Task” and select the files that you downloaded. I would suggest importing the tasks first.
You can’t leave footprints in the sand of time if all you do is sit on your butt. And no one wants to leave butt-prints in the sand of time.