greynode http://greynode.org ingénierie de tous les aspects de vie Fri, 15 Apr 2011 16:12:00 +0000 en hourly 1 http://wordpress.org/?v=3.1.1 Greynode Back Online http://greynode.org/2011/02/16/greynode-back-online/ http://greynode.org/2011/02/16/greynode-back-online/#comments Wed, 16 Feb 2011 23:28:50 +0000 enum http://greynode.org/?p=282

Read the rest of this entry »

]]>
It has been a few months since I last posted here. This was mostly due to a server change. The site could have been back up quicker, but I wanted to make refinements to the site before re-launching (you’ll notice the new design if you’ve been here before).

I have done quite a bit since the last post, so there will be more posts to come!

]]>
http://greynode.org/2011/02/16/greynode-back-online/feed/ 0
HTTPService Over SSL Flex 4 http://greynode.org/2010/08/09/httpservice-over-ssl-flex-4/ http://greynode.org/2010/08/09/httpservice-over-ssl-flex-4/#comments Mon, 09 Aug 2010 22:23:28 +0000 enum http://blog.greynode.org/?p=240

Read the rest of this entry »

]]>
Using SSL for HTTPService communication and loading images is very easy in Flex 4. There are differences between using HTTPService over SSL and loading images over SSL, however neither is complicated.

Communication using HTTPService over SSL

  1. Host the flex 4 application on an SSL enabled host
  2. Ensure the application is loaded over SSL (i.e. the URL has https:// prefix)
  3. Make HTTPService.url a relative path to where the SWF is stored

Using SSL for mx:Image

Set the Image.source attribute to the full URL, including the https:// prefix, like so:

<mx:Image source="https://server.com/image.jpg"/>

]]>
http://greynode.org/2010/08/09/httpservice-over-ssl-flex-4/feed/ 0
Cartoon Shader using GLSL http://greynode.org/2010/05/14/cartoon-shader-using-glsl/ http://greynode.org/2010/05/14/cartoon-shader-using-glsl/#comments Fri, 14 May 2010 21:01:58 +0000 enum http://blog.greynode.org/?p=230

Read the rest of this entry »

]]>
Here is an example of a shader written in the OpenGL Shading Language (GLSL). It is very simple shader, only assigning 4 different color values, yet the result is pretty cool. I’ll post the link to the source code once I add it to my git repository.

For introductory material on GLSL, check out Lighthouse 3D (where I got this cartoon example). Also check out the orange book for more in-depth discussion and examples on shaders.

]]>
http://greynode.org/2010/05/14/cartoon-shader-using-glsl/feed/ 0
Ask comp.lang.c to Do Your Homework http://greynode.org/2010/05/11/ask-comp-lang-c-to-do-your-homework/ http://greynode.org/2010/05/11/ask-comp-lang-c-to-do-your-homework/#comments Wed, 12 May 2010 08:45:00 +0000 enum http://blog.greynode.org/?p=228 A funny post on comp.lang.c.

]]>
http://greynode.org/2010/05/11/ask-comp-lang-c-to-do-your-homework/feed/ 0
Why No Games on Linux? http://greynode.org/2010/05/11/why-no-games-on-linux/ http://greynode.org/2010/05/11/why-no-games-on-linux/#comments Tue, 11 May 2010 20:54:26 +0000 enum http://blog.greynode.org/?p=226 Thought I would share an interesting article on why there are no games on linux. Want more games on linux? Solve these problems!

]]>
http://greynode.org/2010/05/11/why-no-games-on-linux/feed/ 0
Incremental Backup on FreeBSD with tar http://greynode.org/2010/05/10/incremental-backup-on-freebsd-with-tar/ http://greynode.org/2010/05/10/incremental-backup-on-freebsd-with-tar/#comments Mon, 10 May 2010 22:46:38 +0000 enum http://blog.greynode.org/?p=221

Read the rest of this entry »

]]>
Recently the rsync server at work broke down, and I needed a quick solution for incremental backup using just FTP. As it turns out, the FreeBSD version of tar is not GNU tar. So in order to use the following trick on FreeBSD, the gtar port must be installed. Once you have the software, making an increment backup with tar is easy:

$ gtar -g /backup/tar-incremental.log -cjvf /backup/backup.tar.bz2 /etc /usr/local/etc/ /usr/www

The tar-incremental.log file must be saved as it contains information for the incremental backup. Every time you run this file a new file will be created, so do not over-write your files. A more in-depth discussion can be found on the GNU tar incremental backup page.

]]>
http://greynode.org/2010/05/10/incremental-backup-on-freebsd-with-tar/feed/ 0
pdnsd and NetworkManager http://greynode.org/2010/05/09/pdnsd-and-networkmanager/ http://greynode.org/2010/05/09/pdnsd-and-networkmanager/#comments Mon, 10 May 2010 07:52:55 +0000 enum http://blog.greynode.org/?p=211

Read the rest of this entry »

]]>
If you run arch linux or a similar minimal distro, you may be familiar with the local dns server pdnsd, used to cache DNS queries. If you try to run pdnsd on the same computer as NetworkManager, you may run into a problem. Using default configurations, your DNS lookups end up in a vicious loop redirecting to 127.0.0.1. To circumvent this problem, I did the following.

I let NetworkManager generate my /etc/resolv.conf file. I then copied it to /etc/resolv.conf.head. Once this was done, the server section in /etc/pdnsd.conf was edited to contain the following:

server {
label= "comcast;
file = "/etc/resolv.conf.head"; # Preferably do not use /etc/resolv.conf
# proxy_only=on; # Do not query any name servers beside your ISP's.
timeout=4; # Server timeout; this may be much shorter
# that the global timeout option.
uptest=if; # Test if the network interface is active.
interface=wlan0; # The name of the interface to check.
interval=10m; # Check every 10 minutes.
purge_cache=off; # Keep stale cache entries in case the ISP's
# DNS servers go offline.
}

Notice the file variable which tells pdnsd where to find the nameservers it will query. Once this is complete, the pdnsd daemon can be restarted. Now, NetworkManager must be told to use localhost for DNS lookups. This can be done by right-clicking the nm-applet icon and configuring the wireless for “Automatic (DHCP) Address Only”, and enter 127.0.0.1 as the DNS server. Once this is complete, you can test it with the following commands:

jaigner /var/cache $ dig kernel.org | grep Query
;; Query time: 75 msec
jaigner /var/cache $ dig kernel.org | grep Query
;; Query time: 0 msec

The second time the command was called, the cached result was fetched. If your Query time is greater than 1ms, it is likely that something is misconfigured.

]]>
http://greynode.org/2010/05/09/pdnsd-and-networkmanager/feed/ 0
Key Repeat in Linux Xorg Not Working http://greynode.org/2010/05/08/key-repeat-in-linux-xorg-not-working/ http://greynode.org/2010/05/08/key-repeat-in-linux-xorg-not-working/#comments Sat, 08 May 2010 19:59:46 +0000 enum http://blog.greynode.org/?p=195

Read the rest of this entry »

]]>
After installing arch linux on my laptop, I noticed a small annoyance. When I opened any sort of terminal in Xorg, they key repeat feature would not function (i.e. holding a key down would not cause it to continuously be entered). The solution turns out to be quite simple:

jaigner@turing$ xset r on

This will enable key repeat functionality.

]]>
http://greynode.org/2010/05/08/key-repeat-in-linux-xorg-not-working/feed/ 0
Google Maps 3.3.1 on Cyanogen Mod 4.2.5 http://greynode.org/2009/12/14/google-maps-3-3-1-on-cyanogen-mod-4-2-5/ http://greynode.org/2009/12/14/google-maps-3-3-1-on-cyanogen-mod-4-2-5/#comments Tue, 15 Dec 2009 06:09:54 +0000 enum http://greynode.org/?p=170

Read the rest of this entry »

]]>
If you are having problems installing the new Google maps application with GPS navigation on Cyanogen, follow the steps below to install the new maps app on g1 or myTouch or other android phone:

Download the apk file from here: Google Maps 3.3.1 download

Transfer the file to the root directory of your SD card. Once the file is on your SD card, you can use an application such as Astro file manager to install the file. Simply click on the google maps icon, and click the “update” button. Maps might freeze up the first time you boot it, just wait and it should load fine.

If all the steps worked without error, you should be good to go! Have fun with the new app.

]]>
http://greynode.org/2009/12/14/google-maps-3-3-1-on-cyanogen-mod-4-2-5/feed/ 2
Python 2 to 3 http://greynode.org/2009/12/02/python-2-to-3/ http://greynode.org/2009/12/02/python-2-to-3/#comments Wed, 02 Dec 2009 18:11:12 +0000 enum http://greynode.org/?p=157

Read the rest of this entry »

]]>
Updating to Python 3? I found a nice cheat sheet by Mark Summerfield that shows a concise summary of the differences between Python 2 and Python 3, as well as some of the more common features of Python 3.

This document is freely available from InformIT’s website, but I have also mirrored it. Download the cheat sheet below.

Python2Python3.pdf from greynode.org

Python2Python3.pdf from InformIT’s site

]]>
http://greynode.org/2009/12/02/python-2-to-3/feed/ 0