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).
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:
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)
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.
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).

Comments [0]
Perfect vim indentation settings
set smartinden
set autoindent
set noexpandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
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
Comments [0]
Best way to load your JavaScript
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:
- 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.
- Include the first JavaScript file with a
<script>tag at the bottom of the page, just inside the</body>.- 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:
-
- function loadScript(url, callback){
-
- var script = document.createElement("script")
- script.type = "text/javascript";
-
- if (script.readyState){ //IE
- script.onreadystatechange = function(){
- if (script.readyState == "loaded" ||
- script.readyState == "complete"){
- script.onreadystatechange = null;
- callback();
- }
- };
- } else { //Others
- script.onload = function(){
- callback();
- };
- }
-
- script.src = url;
- document.getElementsByTagName("head")[0].appendChild(script);
- }
-
In related news, the LABjs folk have updated their API from this:
-
- $LAB
- .script("jquery.js")
- .block(function(){
- $LAB
- .script("jquery.ui.js")
- .script("myplugin.jquery.js")
- .block(function(){
- $LAB.script("initpage.js");
- });
- });
-
to the simpler:
-
- $LAB
- .script("jquery.js")
- .block()
- .script("jquery.ui.js")
- .script("myplugin.jquery.js")
- .block()
- .script("initpage.js");
-
I seem to remember that Steve had some opinions on this API too :)
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
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
Comments [0]

