February 2012
11 posts
1 tag
2 tags
Modem Huawei E353 on Ubuntu 12.04 with forced 2G...
Finally I’ve managed to make my modem to work. The only trick was finding the right AT command to force 2G mode. The speed isn’t great, but since I have it for emergencies only it will do,
First, install wvdial through apt-get.
Then put this into your /etc/wvdial.conf:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT^SYSCFG=13,0,3FFFFFFF,2,3
Modem...
1 tag
Who keeps asking you when the business is going to have a Facebook page? Who...
– Gary Vaynerchuk, “The Thank You Economy”
4 tags
Fast Rails Tests - Corey Haines →
Beautiful talk. Slow tests are not caused by bad test design but by bad code design.
2 tags
How One Kitchen Table in Brooklyn Became a School... →
3 tags
Ruby Koans taught me something today.
>> x = %w(a b)
=> ["a", "b"]
>> x[0]
=> "a"
>> x[1]
=> "b"
>> x[2]
=> nil
>> x[3]
=> nil
>> x[0,1]
=> ["a"]
>> x[1,1]
=> ["b"]
>> x[2,1]
=> []
>> x[3,1]
=> nil
This special case of slicing from the array.length is even described in the documentation.
1 tag
2 tags
CoffeeScript makes code beautiful
Definition:
catchAndReturn = (callback) ->
try
callback()
catch error
error
and use:
catchAndReturn ->
...
instead of:
catchAndReturn = function(callback) {
try {
return callback();
} catch (error) {
return error;
}
};
and:
return catchAndReturn(function() {
...
});
1 tag
3 tags
Undocumented but very important whenever feature: ability to set environment variables for the genrated crontab, e.g.:
env 'PATH', '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'