Archive for Cuvedev

Sublime Text 2 – Command on Save

// februari 22nd, 2012 // 2 Comments » // Cuvedev

This is a plugin based on the one I wrote here: sublime-text2-rsync-on-save
The problem with the rsync-on-save plugin, is that it doesn’t support project specific rsync commands, mainly because Sublime Text doesn’t support project specific settings for packages.

In this plugin I worked around it in a certain way. I created a  plugin which executes a command based on the folder path.
The path-command mapping is stored in a settings file, so it can be edited from  within Sublime Text 2.

I put the project on GitHub, so to install it, clone this repository into your packages folder.

There are some examples of path-command mapping in the settings file, and FYI, this is how my settings file looks:

{
  "commands": [
    "/Users/klaascuvelier/Projects/showpad/cms/::/Users/klaascuvelier/Projects/showpad/cms/commandonsave.sh &",
    "/Users/klaascuvelier/Projects/showpad/presentation/::/Users/klaascuvelier/Projects/showpad/presentation/commandonsave.sh &",
    "/Users/klaascuvelier/Projects/showpad/dashboard/::/Users/klaascuvelier/Projects/showpad/dashboard/commandonsave.sh &",
    "/Users/klaascuvelier/Projects/showpad/support/::/Users/klaascuvelier/Projects/showpad/support/commandonsave.sh &"
  ]
}

Tethering on jailbroken iPhone 3G with IOS 4.2.1

// december 8th, 2010 // 3 Comments » // Cuvedev, iPhone, nohomepage

I was able to enable tethering on my iPhone 3G with IOS 4.2.1.
To do so, I had to jailbreak my iPhone and install Cydia. Using redsn0w 0.9.6b4 it was a piece of cake. Attention, I have an iPhone 3G, so this is a full jailbreak, not a tethered jailbreak. I haven’t tested this with a tethered jailbreak.
If you haven’t jailbroken your phone yet, here’s a guide.

Once you’ve jailbroken your phone, install openSSH (using Cydia), so you can ssh into your device.
Don’t forget to change your root password (more info on this here)!

Now to enable tethering, you’ll have to install an application called TetherMe. You can buy and install it on your iPhone using Cydia or you can look for the installer on the internet and do it for free (illegally off course).

If you want to do it for free, I’ll make it easy for you, you can download it here: TetherMe-xsellize.deb
When you have the .deb file, scp it onto your iPhone, and install it using ssh (instructions below).

To ssh and scp to your phone you’ll need the IP-address of your phone.
Go to Settings > Wi-Fi and click on the white arrow in the blue circle of the network you’re connected to, you’re IP-address should on the info page you get.
Then, on your computers console do this:

$ scp Downloads/TetherMe-xsellize.deb root@192.168.100.118:/private/var/mobile

Replace the IP-address above with yours and enter your root password (if you haven’t changed it, its alpine).

Then ssh into your iPhone to install it:

$ ssh root@192.168.100.118

And install the file:

# cd /private/var/mobile/
# dpkg -i TetherMe-xsellize.deb

When it’s installed you should reboot your iPhone, and tethering should be enabled.


Disclaimer:
I don’t encourage jailbreaking iPhones and installing illegal software. I’m just pointing out it can be done.
Also I don’t take any responsibility for anything if you fuck up your iPhone

So, I made a clock

// oktober 24th, 2010 // 4 Comments » // Cuvedev, Development, Javascript

So yes, I made a clock. In JavaScript (and HTML).
It’s not just another JavaScript analog or digital clock, it’s actually a clock which is easy to read and it’s based on this design: QLOCKTWO by Biegert&Funk.

I think it’s a cool way to display time. When I considered buying the clock, I was shocked when I saw the price. So I though it would be a nice challenge to make it myself, in JavaScript.

Here is the result:

And you can see it in action here.

I am in particular proud of the JavaScipt code. The clock is “built” with text predefined text strings, and right strings are highlighted using a “logic” for the selected language. In this way it is fairly easy to add new languages (at this time only Dutch and English are available). I used the PrototypJS-library because I’m used to it, and it shortened my code drastically.

Tested in:
- Google Chrome 8
- Firefox 3.6 and 4.0
- Safari 5
- Internet Explorer 8

Update:
And this is what it looks like on an iPad:

still pretty expensive for “just a clock”, but already cheaper than the qlocktwo.

WordPress plugin: Authentication

// juli 25th, 2010 // 51 Comments » // Cuvedev, Development, download, plugin, Wordpress

So, I finally submitted my first plugin to the WordPress plugin base.

It’s a plugin which add functionality to request visitors authentication before the website can be viewed. It doesn’t use HTTP Authentication, just php and html.
You can choose to use the WordPress authentication functionality to login, or give a password yourself.

Try it out, and give some feedback.

Link to Basic Authentication plugin

Screenshot:
options

 

– Update:

Now compatible with WordPress 3.3

Boxee on Ubuntu Lucid Minimal on Asrock ION 330

// juni 30th, 2010 // 7 Comments » // Boxee, Bugs, Cuvedev, Linux, Ubuntu

Yesterday I performed a clean install from Ubuntu Lucid Lynx Minimal on my Asrock Ion 330.
I followed this guide like I did last time (for an earlier version of Ubuntu Minimal) but I encountered some problems.

Here’s how I solved them.

In chapter “Updating the computer”, change in the sources.list hardy or intreprid or jaunty by “lucid”.
No problems in “Install sound”.

The real problems came in “Installing the graphical environment”.
When I wanted to install the latest driver for my ION graphics card I always got this error:

ERROR: Unable to load the kernel module ‘nvidia.ko’. This is most likely
because the kernel module was built using the wrong kernel source files.
Please make sure you have installed the kernel source files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
‘kernel-source’ rpm installed. If you know the correct kernel source
files are installed, you may specify the kernel source path with the
‘–kernel-source-path’ commandline option.

It took me a while before I found this solution:
Make the file (or edit the file if it already exists)  /etc/default/linux-restricted-modules-common
and add this content:

DISABLED_MODULES=”nv nvidia_new”

Now you should be able to run the installer without problems.

Another small problem was, logging in automatically. In earlier releases of Ubuntu you had to change some commands in /etc/event.d/tty1 (according to the guide mentioned earlier), but in Ubuntu Lucid, the event.d folder doesn’t exist anymore, and you have to put it in /etc/init/ instead.

Good Luck!