Test

This is

A test…

Please feel to ignore it ;-)

  1. whoop
  2. whop
  3. whapTes
Loading mentions Retweet
Filed under  //   programming   test  

Comments [0]

Easy color theme loading

Wheew. Switching from VIM to Emacs was easier than expected - few days of getting used to different keyboard shortcuts (which feel more natural than VIM's) and it looks like I can use it without any disruptions.
Obviously I'm not at the same level of control as with VIM, but strangely - I'm picking it up a lot faster.
Additionaly - many VIM habbits can be easily transfered to Emacs (deleting words, navigation, how the copy/paste functions work, etc).

One thing I find much better in Emacs is the scripting language which drives the whole editor. Vimscript doesn't come near close to elisp - in both syntax and abilities. It can be clearly seen that vimscript is an afterthought.

Elisp makes Emacs so easy to customize, and it seems like there are no limits where you can go with these customizations (obviously - common sense is the limit ;-)).

If there's something you need to do in Emacs - you can do it.

I'm a color-scheme/theme freak. White background simply doesn't work for me. Ugly, standard colors for keyword as well.
I like trying out new ones and I'm still searching for the perfect one. On the other hand - I always come back to the theme insipred/based on famous Monokai color scheme.

Unfortunately the themes bundled with color-theme.el (emcas plugin enabling you to use and change color themes) don't suit my taste at all. VIM and its community is so much batter in that regard (both in quality and numbers).
After googling around I found some cool ones (including the mentioned Monokai port) and started installing them.

Hold up... Vim clearly got this part right:
:colorscheme molokai
Done.

Emacs requires you to:
1. Include the color-theme library (it's not included in the Emacs23 OSX build)
2. Load it
3. Save somewhere your theme file
4. Load the theme file
5. Call a theme loading function

Wait... What?

It's clear that Emacs is not a simple application, but for such a trivial feature it seems to be quite an overkill.
Or maybe it's just me.

LMFTFY:

Loading mentions Retweet
Filed under  //   emacs   programming  

Comments [0]

Maximize VIM window

Use this little thingie:

(License: you can use this script only for GOOD, never for evil. If
you really must - contact me, we can talk about the price)

Loading mentions Retweet
Filed under  //   productivity   programming   vim  

Comments [0]

Aptana WRT Plugin Basics - Forum Nokia Wiki

NOTE: If you fail to utilize AJAX calls while debugging or previewing, you can try circumventing the same origin policy in Firefox with the following steps. This is done at your own risk + The call to Privilege manager cannot be executed in a real S60 device or the emulator.

  • Add a netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); call to the function issuing your AJAX requests
  • Type about:config in Firefox address bar and set signed.applets.codebase_principal_support value to true by double-clicking it.
  • Initialize a debugging session and issue an AJAX call => You should now be prompted about giving the script access to whatever domain you are requesting from.

Aptana's WRT plugin doesn't work for me - JS stops executing and all that.
However - the hint on how to bypass Same Origin Policy is something that needs to be saved for later.

Loading mentions Retweet
Filed under  //   programming   technology  

Comments [0]

Adobe AIR documentation

What's this? I can see the xxx's all over the place.
Is it a suggestion that I should creat a pr0n app? (Which is quite good idea, because pr0n === money).

Loading mentions Retweet
Filed under  //   geeky   programming   technology  

Comments [0]

Perfect vim indentation settings

" ~/.vimrc
set smartinden
set autoindent
set noexpandtab
set tabstop=4
set shiftwidth=4    
set softtabstop=4

These settings finally make my vim behave properly.

 

Update

These are more, hmmm standard settings - think Ruby and Javascript

set smartinden
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2    
set softtabstop=2

Loading mentions Retweet
Filed under  //   geeky   programming   vim  

Comments [0]

Best way to load your JavaScript

via Ajaxian » Front Page by Dion Almaer on 7/30/09

Nicholas Zakas thinks he has the best way to load JavaScript.

Steve Souders has a bunch of best practices, and it seems that there is definitely nuance that makes advice very much tailored to your circumstance.

Nicholas though, has an opinion:

I’ve come to the conclusion that there’s just one best practice for loading JavaScript without blocking:

  1. Create two JavaScript files. The first contains just the code necessary to load JavaScript dynamically, the second contains everything else that’s necessary for the initial level of interactivity on the page.
  2. Include the first JavaScript file with a <script> tag at the bottom of the page, just inside the </body>.
  3. Create a second <script> tag that calls the function to load the second JavaScript file and contains any additional initialization code.

A helper to make this happen could look like:

JAVASCRIPT:
  1.  
  2. function loadScript(url, callback){
  3.  
  4.     var script = document.createElement("script")
  5.     script.type = "text/javascript";
  6.  
  7.     if (script.readyState){  //IE
  8.         script.onreadystatechange = function(){
  9.             if (script.readyState == "loaded" ||
  10.                     script.readyState == "complete"){
  11.                 script.onreadystatechange = null;
  12.                 callback();
  13.             }
  14.         };
  15.     } else {  //Others
  16.         script.onload = function(){
  17.             callback();
  18.         };
  19.     }
  20.  
  21.     script.src = url;
  22.     document.getElementsByTagName("head")[0].appendChild(script);
  23. }
  24.  

In related news, the LABjs folk have updated their API from this:

JAVASCRIPT:
  1.  
  2. $LAB
  3. .script("jquery.js")
  4. .block(function(){
  5.       $LAB
  6.       .script("jquery.ui.js")
  7.       .script("myplugin.jquery.js")
  8.       .block(function(){
  9.             $LAB.script("initpage.js");
  10.       });
  11. });
  12.  

to the simpler:

JAVASCRIPT:
  1.  
  2. $LAB
  3. .script("jquery.js")
  4. .block()
  5. .script("jquery.ui.js")
  6. .script("myplugin.jquery.js")
  7. .block()
  8. .script("initpage.js");
  9.  

I seem to remember that Steve had some opinions on this API too :)

Loading mentions Retweet
Filed under  //   javascript   programming  

Comments [1]

R programming language

The assignment operator in R is <- as in

e <- m*c^2.

It is also possible, though uncommon, to reverse the arrow and put the receiving variable on the right, as in

m*c^2 -> e.

It is sometimes possible to use = for assignment, though I don't understand when this is and is not allowed. Most people avoid the issue by always using the arrow.

Looks like I’m not going to learn this language.

Sauce:  http://www.johndcook.com/R_language_for_programmers.html

Loading mentions Retweet
Filed under  //   geeky   programming  

Comments [0]

Up and running

Loading mentions Retweet
Filed under  //   geeky   mac   programming   technology   vim  

Comments [0]

Coding Horror: Nobody Hates Software More Than Software Developers

When people say "this sucks" they mean one or more of the following:

  • This doesn't do what I need
  • I can't figure out how to do what I need
  • This is unnecessarily frustrating and complex
  • This breaks all the time
  • It's so ugly I want to vomit just so I have something prettier to look at
  • It doesn't map to my understanding of the universe
  • I'm thinking about the tool, instead of my work

This article doesn't suck. If you are a software developer - read it. Now

Loading mentions Retweet
Filed under  //   geeky   programming  

Comments [0]

About

http://coffeesounds.com
Webdev, coffee drinker and all that