ECDSA vs ECDH vs Ed25519 vs Curve25519

Question: Among the Elliptic Curve Cryptography (ECC) algorithms available in OpenSSH (ECDH, ECDSA, Ed25519, Curve25519), which offers the best level of security, and (ideally) why?
Comment: That's a pretty weird way of putting it. Curve25519 is one specific curve on which you can do Diffie-Hellman (ECDH). Diffie-Hellman is used to exchange a key. Ed25519 and ECDSA are signature algorithms.
Comment: Also see Bernstein's [Curve25519: new Diffe-Hellman speed records](https://cr.yp.to/ecdh/curve25519-20060209.pdf). He seems to do a pretty good job and answers a lot of your questions.
Comment: related: [SSH Key: Ed25519 vs RSA](http://security.stackexchange.com/questions/90077/ssh-key-ed25519-vs-rsa)
Comment: https://wiki.archlinux.org/index.php/SSH_keys#Choosing_the_authentication_key_type
Answer: In SSH, two algorithms are used: a key exchange algorithm (Diffie-Hellman or the elliptic-curve variant called ECDH) and a signature algorithm. The key exchange yields the session key which will be used to encrypt data for that session. The signature is so that the client can make sure that it talks to the right server (another signature, computed by the client, may be used if the server enforces key-based client authentication).
ECDH uses a curve; most software use the standard NIST curve P-256. Curve25519 is another curve, whose "sales pitch" is that it is faster, not stronger, than P-256. The performance difference is very small in human terms: we are talking about less than a millisecond worth of computations on a small PC, and this happens only once per SSH session. You will not notice it. Neither curve can be said to be "stronger" than the other, not practically (they are both quite far in the "cannot break it" realm) nor academically (both are at the "128-bit security level").
Even when ECDH is used for the key exchange, most SSH servers and clients will use DSA or RSA keys for the signatures. If you want a signature algorithm based on elliptic curves, then that's ECDSA or Ed25519; for some technical reasons due to the precise definition of the curve equation, that's ECDSA for P-256, Ed25519 for Curve25519. There again, neither is stronger than the other, and speed difference is way too small to be detected by a human user.
However most browsers (including Firefox and Chrome) do not support ECDH any more (dh too).
Using P-256 should yield better interoperability right now, because Ed25519 is much newer and not as widespread. But, for a given server that you configure, and that you want to access from your own machines, interoperability does not matter much: you control both client and server software.
So, basically, the choice is down to aesthetics, i.e. completely up to you, with no rational reason. Security issues won't be caused by that choice anyway; the cryptographic algorithms are the strongest part of your whole system, not the weakest.
Comment: The "sales pitch" for 25519 is more: It's not NIST, so it's not NSA. Not speed.
Comment: More "sales pitch" comes from [this IETF draft](https://tools.ietf.org/html/draft-ietf-ipsecme-safecurves-03#section-4):

_While the NIST curves are advertised as being chosen verifiably at random, there is no explanation for the seeds used to generate them. In contrast, the process used to pick these curves is fully documented and rigid enough so that independent verification has been done.  This is widely seen as a security advantage, since it prevents the generating party from maliciously manipulating the parameters._
Comment: According to DJB's http://safecurves.cr.yp.to/ website, the NIST curve may not be as safe or foolproof as the Curve25519.
Comment: Actually, it's very much speed as well. Well constructed Edwards / Montgomery curves can be multiple times faster than the established NIST ones.

https://www.imperialviolet.org/2010/12/21/eccspeed.html
Comment: In fact, if you really want speed on a recent PC, the NIST-approved binary Koblitz curves are even faster (thanks to the "carryless multiplication" opcode which comes with the x86 AES instruction); down to something like 40000 cycles for a generic point multiplication in K-233, more than twice faster than Curve25519 -- but finding a scenario where this extra speed actually makes a noticeable difference is challenging.
Comment: I appreciate that the public key with ed25519 is way shorter than the 4096 bit RSA for use with SSH.
Comment: @bb010g: it's the same algorithm, but on a hardware token. See http://www.openssh.com/txt/release-8.2 under "FIDO/U2F Support".
Comment: There are actually three algorithms.  The host (and client) key algorithm (authentication), the key exchange (kex) algorithm, and the cipher.
Comment: @MartinSchröder, Enigma was not invented by Americans either...
Comment: What algorithm does OpenSSH's `ed25519-sk` use, and how does it differ from traditional Ed25519?
Answer: From the Introduction to Ed25519, there are some speed benefits, and some security benefits.  One of the more interesting security benefits is that it is immune to several side channel attacks:

No secret array indices. The software never reads or writes data from secret addresses in RAM; the pattern of addresses is completely predictable. The software is therefore immune to cache-timing attacks, hyperthreading attacks, and other side-channel attacks that rely on leakage of addresses through the CPU cache.
No secret branch conditions. The software never performs conditional branches based on secret data; the pattern of jumps is completely predictable. The software is therefore immune to side-channel attacks that rely on leakage of information through the branch-prediction unit.

For comparison, there have been several real-world cache-timing attacks demonstrated on various algorithms. http://en.wikipedia.org/wiki/Timing_attack
Comment: *"One of the more interesting security benefits is that it is immune to several side channel attacks"* - To state the obvious, that depends on the implementation. Bernstein team's code, Adam Langley's code, Andrew Moon's code (et al) should be OK. But I don't think you can say the same for an arbitrary implementation.
Comment: I guess it would be more precise to say, the design of the algorithm makes it possible to implement it without using secret array indices or branch conditions.  Of course you're right that it would still be possible to implement it poorly.
Comment: As a matter of fact, ECDSA on P-256 can be implemented without secret array indices and without secret branch conditions too, if you use the complete addition formulas (https://joostrenes.nl/talks/complete.pdf). Ed25519 is not intrinsically secure, and as a matter of fact most of its implementation use tables indexed by a secret (!!!), but some masking is used to read from all tables each time. That is a technique that many algorithms and curves (including P-256) can rely on.
Comment: One time pads aren't secure because it depends on the implementation.
Answer: There is an important practical advantage of Ed25519 over (EC)DSA: The latter family of algorithms completely breaks when used for signatures together with a broken random number generator. Such a RNG failure has happened before and might very well happen again.
Theoretically, implementations can protect against this specific problem, but it is much harder to verify that both ends are using a correct implementation than to just prefer or enforce (depending on your compatibility needs) an algorithm that explicitly specifies secure behavior (Ed25519).
Comment: Nice, didn't know. Link to more info: https://crypto.stackexchange.com/a/27800/58316
Answer: I was under the impression that Curve25519 IS actually safer than the NIST curves because of the shape of the curve making it less amenable to various side channel attacks as well as implementation failures. See: http://safecurves.cr.yp.to
Ed25519 has the advantage of being able to use the same key for signing for key agreement (normally you wouldn't do this). I am not well acquainted with the mathematics enough to say whether this is a property of it being an Edwards curve, though I do know that it is converted into the Montgomery coordinate system (effectively into Curve25519) for key agreement...
Ed25519 is more than a curve, it also specifies deterministic key generation among other things (e.g. hashing) , worth keeping in mind. This is a frustrating thing about DJB implementations, as it happens, as they have to be treated differently to maintain interoperability.
Answer: Something that no answer so far addressed directly is that your questions mixes several more or less unrelated names together as if these were equivalent alternatives to each other which isn't really the case.
ECDH and ECDSA are just names of cryptographic methods.
ECDH is a key exchange method that two parties can use to negotiate a secure key over an insecure communication channel. It's a variation of the DH (Diffie-Hellman) key exchange method. ECDH stands for Elliptic-curve Diffie–Hellman. Yet ECDH is just a method, that means you cannot just use it with one specific elliptic curve, you can use it with many different elliptic curves.
ECDSA is a signature algorithm that can be used to sign a piece of data in such a way, that any change to the data would cause signature validation to fail, yet an attacker would not be able to correctly re-sign data after such a change. It is a variation of DSA (Digital Signature Algorithm). ECDSA stands for Elliptic Curve Digital Signature Algorithm. Also ECDSA only describes a method which can be used with different elliptic curves.
The security of ECDH and ECDSA thus depends on two factors:

How secure is the method itself? If the method isn't secure, the best curve in the word wouldn't change that.
How secure is the curve being used? If the curve isn't secure, it won't play a role if the method theoretically is.

Curve25519 is the name of a specific elliptic curve. Other curves are named Curve448, P-256, P-384, and P-521.
Ed25519 is the name of a concrete variation of EdDSA. When performing EdDSA using SHA-512 and Curve25519, this variation is named Ed25519. EdDSA is a signature algorithm, just like ECDSA.
So if an implementation just says it uses ECDH for key exchange or ECDSA to sign data, without mentioning any specific curve, you can usually assume it will be using the NIST curves (P-256, P-384, or P-512), yet the implementation should actually always name the used curve explicitly.
To answer your question about security: ECDH and ECDSA have pretty much been proven to be conceptional secure key exchange and signing methods, thus the security of ECDH and ECDSA pretty much depends on the fact if someone finds a way how to break elliptic cryptography in general (little likely but not impossible) or to find a flaw within the curves being used (more likely).
The reason why some people prefer Curve25519 over the NIST standard curves is the fact, that the NIST hasn't clearly documented why it has chosen theses curves in favor of existing alternatives. The generic statement "The curves were ostensibly chosen for optimal security and implementation efficiency" sounds a lot like marketing balderdash and won't convince cryptographic experts.
The NIST also standardized a random number generator based elliptic curve cryptography (Dual_EC_DRB) in 2006 and the New York times claimed (after reviewing the memos leaked by Edward Snowden) that it was the NSA influencing the NIST to standardize this specific random number generator. A huge weaknesses has been discovered in that generator and it is believed that it is an intentional backdoor placed by the NSA to be able to break TLS encryption based on that generator. The ANSI apparently discovered the weakness when Dual_EC_DRB was first submitted to them but despite being aware how to avoid it, they did neither improve the algorithm, nor did they publicize the weaknesses, so it is believed that they weren't allowed to (gag order). When the weakness became publicly known, the standard was withdrawn in 2014.
With that background knowledge, of course, people started to wonder if maybe the source of the mysterious NIST curve parameters is in fact also the NSA as maybe these curves have also hidden weaknesses that are not publicly known yet but the NSA may know about them and thus be able to break cryptography based on these curves. There is no evidence for that claim, not even a presumptive evidence but it surely seems possible and more realistic than a fairy tale. That's why people lost trust into these curves and switched to alternatives where it is highly unlikely, that these were influenced by any secret service around the world.
Curve25519 was published by the German-American mathematician and cryptologist Daniel J. Bernstein in 2005, who also designed the famous Salsa20 stream cipher and the now widely used ChaCha20 variant of it. He also invented the Poly1305 message authentication. Google decided that ChaCha20 in combination with Poly1305 is a secure alternative to be used in TLS after RC4 had to be removed because the algorithm has been broken. It requires much less computation power than using the AES block chipher (very useful for mobile devices as it saves battery runtime), yet is believed to provide comparable security. ChaCha20/Poly1305 is standardized in RFC 7905 and widely used today in TLS client-server communication as of today. So if Bernstein was a NSA spy, which is very unlikely, we'd all be doomed already as then TLS as it is often used today would probably be useless to protect data from the eyes of secret services.
Comment: I just wanted to point out that you have a typo in the revision description where you misspelled "annoying nitpickers."
Comment: Although ECDSA can be used with multiple curves, it is not in fact used with Bernstein's. Ed25519 and Ed448 are instances of EdDSA, which is a different algorithm, with some technical advantages. And in OpenSSH (as asked) the command option `ssh-keygen -t ecdsa` and default filename `id_ecdsa*` don't specify the curve, but the actual key (contents) including on the wire and in `known_hosts` etc _do_; see rfc5656. Including nistP-521, not P-512 which does not exist.
Comment: @dave_thompson_085 I never claimed that ECDSA is used with Bernstein's. I never claimed that openSSH specifies a curve. So please refrain from commenting things I've never written. And P-512 was clearly a typo just like ECDSA for EdDSA, after all I wrote a lot of text, so typos just happen.
Comment: Shouldn't you have a "**EdDsa is [...]" paragraph somewhere before the one for **Ed25519**?
Comment: @SamB EdDSA hasn't been asked in the original question. The question asked for ECDH, ECDSA, Ed25519, and Curve25519, so those were the terms that I explained. It wasn't my goal to explain new terms in details that were not even asked for. And I quickly mentioned that `EdDSA is a signature algorithm, just like ECDSA.`. It's basically a variant of ECDSA.
Answer: ECDH is for key exchange (EC version of DH)
ECDSA is for signatures (EC version of DSA)
Ed25519 is an example of EdDSA (Edward's version of ECDSA) implementing Curve25519 for signatures
Curve25519 is one of the curves implemented in ECC (and the most likely successor to RSA)
The better level of security is based on algorithm strength & key size
eg. Ed448 ciphers have equivalent strength of 12448-bit RSA keys
An algorithm NTRUEncrypt claims to be quantum computer crack resistant, and is a lattice-based alternative to RSA and ECC.

ECDSA vs ECDH vs Ed25519 vs Curve25519


Movement speed in Diablo 3?

Question: Some items have movement speed and some characters have movement speed buffs or skills. What is the fastest movement speed you can have in Diablo 3?
Answer: There's a hard movement speed cap of 25% from items. Skills and passives can surpass that limit though. Movement speed bonuses from items stack additively, but I don't know how skills affect it afterwards. I believe the highest possible would be a combination of these (I may be wrong):

Barbarian with +25% movement speed gear
Sprint ability with the 60% for 5 seconds rune
Witch Doctor's Big Bad Voodoo for an additional 20%.

If they do in fact stack additively for skills as well, then you could get a total of +105% movement speed.
Answer: Big Bad Voodoo is an immovable totem pole with a large aoe, it won't be very helpful after you leave its range.
Barbarian's Sprint (costs 20 Fury) ability with the Marathon rune allows for 50% movement speed for 5 seconds. Without the rune, it's only 40% for 3 seconds. With some serious Fury regeneration gear, that could wind up being a pretty reliable and mostly active ability for those high levels trying to do the speed run achievements.
Though I am also unsure if movement speed gear stacks with the ability (total of 75%), or if the ability just enables the movement speed cap to rise while the ability is active...

Movement speed in Diablo 3?


"Vaz Chatasee".........

Question: The Medresh says that Moshe said to Hashem "Vaz Chatasee" with the word Az I have sinned and with the word Az I will say Shirah to you. What does the Medresh means when it says Moshe said with the word Az I have sinned to you and with the word Az I will say Shirah to you It a little bit odd.
Comment: This question is hard to read. If you clean it up, it will be more likely to get good answers. Also, please try to use existing tags, if possible.
Comment: Where does Moshe say "V'az Chatasee"? can you add a source?
Answer: The midrash is referring to two occurences of the word אז (Az, "then"). In the first, Moshe supposedly sins to G-d:
Exodus 5:23:
 וּמֵאָז בָּאתִי אֶל-פַּרְעֹה, לְדַבֵּר בִּשְׁמֶךָ, הֵרַע, לָעָם הַזֶּה; וְהַצֵּל לֹא-הִצַּלְתָּ, אֶת-עַמֶּךָ.
"For since I came to Pharaoh to speak in thy name, he hath done evil to this people; neither hast thou delivered thy people at all."
and in the second he praises (says Shira):
Exodus 15:1:
 אָז יָשִׁיר-מֹשֶׁה וּבְנֵי יִשְׂרָאֵל אֶת-הַשִּׁירָה הַזֹּאת ...

"Vaz Chatasee".........


module.exports vs exports in Node.js

Question: I've found the following contract in a Node.js module:
module.exports = exports = nano = function database_module(cfg) {...}

I wonder what's the difference between module.exports and exports and why both are used here.
Comment: **Quick Summary:** both `exports` and `module.exports` point to the same object, unless you reassign one. And in the end `module.exports` is returned. So if you reassigned `exports` to a function then dont expect a function since it isn't going to be returned. However if you had assigned function like this `exports.func = function...` then resulting thing would have func property with function as a value. Because you added the property to the object that `exports` was pointing to ..
Comment: It's all about references. Think of exports like a local variable object pointing to module.exports. If you overrite the value of exports, then you lose the reference to module.exports, and module.exports is what you expose as a public interface.
Comment: Updated 'for posterity' link: http://nodejs.org/docs/latest/api/modules.html#modules_module_exports
Comment: For posterity: http://nodejs.org/docs/latest/api/modules.html#module.exports
Comment: Can't understand why provide both `module.exports` and `exports`. Why not just provide `module.exports` to avoid such confusion?
Comment: @Neal, hacksparrow - "if you want your module to be of a specific object type, use module.exports; if you want your module to be a typical module instance, use exports." huh, what, why?.
Comment: Here is my 2 minute article on this topic (written in Node v6 and ES2015): https://medium.com/@lazlojuly/node-js-module-exports-vs-exports-ec7e254d63ac
Comment: Well, I have read every single reply here, and I still have no clue what the difference between the two is, when and how to use one vs. the other, or why there are two.
Comment: `module.exports` is not a function... Why is that?
Comment: @JohnLittle check out my new answer re: why use both https://stackoverflow.com/a/50162465/4722345
Comment: @TarranJones I've added my own words for clarity ([]):
If you want your module to be of a specific object type [(such as a function/string/array)], use module.exports;
if you want your module to be a typical module instance, [you should] use exports [, exclusively, to be concise].

See my answer for examples etc. https://stackoverflow.com/a/50162465/4722345
Comment: Updated link to hacksparrow post: https://www.hacksparrow.com/nodejs/exports-vs-module-exports.html
Comment: Great resource (as the first link is dead) : https://www.sitepoint.com/understanding-module-exports-exports-node-js/
Answer: Even though the question has been answered and accepted long ago, I just want to share my 2 cents.
You can imagine that at the very beginning of your file there is something like (just for explanation):
var module = new Module(...);
var exports = module.exports;

So whatever you do just keep in mind that module.exports and NOT exports will be returned from your module when you're requiring that module from somewhere else.
So when you do something like:
exports.a = function() {
    console.log("a");
}
exports.b = function() {
    console.log("b");
}

You are adding 2 functions a and b to the object to which module.exports points, so the typeof the returning result will be an object : { a: [Function], b: [Function] }
Of course, this is the same result you will get if you are using module.exports in this example instead of exports.
This is the case where you want your module.exports to behave like a container of exported values. Whereas, if you only want to export a constructor function then there is something you should know about using module.exports or exports. Recall that module.exports will be returned when you require something, not exports.
module.exports = function Something() {
    console.log('bla bla');
}

Now typeof returning result is 'function' and you can require it and immediately invoke it like:
 var x = require('./file1.js')(); because you overwrite the returning result to be a function.
However, using exports you can't use something like:
exports = function Something() {
    console.log('bla bla');
}
var x = require('./file1.js')(); //Error: require is not a function

Because with exports, the reference no longer points to the object where module.exports points, so there is not a relationship between exports and module.exports anymore. In this case module.exports still points to the empty object {} which will be returned.
The accepted answer from another topic should also help:
Does JavaScript pass by reference?
Comment: oooo finally this answer explains it. Basically export refers to an object to which you can add properties but if you **reassign** it to function then you are no long attach a property to that original object. Now export refer to function while module.exports is still pointing to that object and since it's what's returned. You can say export has been basically garbage collected.
Comment: So then, what's the point of using `exports`? Why not just always use `module.exports` if it's just a variable reassignment? Seems confusing to me.
Comment: @jedd.ahyoung by adding properties to `exports` you are effectively ensuring that you are returning a "typical" module export *object*. In contrast, by using `module.exports` you can return any value you want (primitive, array, function) and not just an object (which is the format most people expect). So `module.exports` offers more power but can also be used to have your module export atypical values (like a primitive). In contrast `exports` is more limiting but safer (so long as you simply add properties to it and don't reassign it).
Comment: @Imray the explanation is here: [Does JavaScript pass by reference?](http://stackoverflow.com/questions/13104494/does-javascript-pass-by-reference)

`exports.a = function(){}; works,

exports = function(){} doesn't work`
Comment: Nice explanation but I still don't understand how you can completely omit `module.exports` from a module, for example in this `npm` package: https://github.com/tj/consolidate.js/blob/master/lib/consolidate.js
Comment: @jedd.ahyoung
It is less cumbersome to write `exports.something` instead of `module.exports.something`
Comment: For me, this was the answer that clicked. Thumbs up for the concise explanation. I recommend everyone to create a node project and constantly log the objects `exports` and `module.exports` to see its behavior.
Comment: Webpack5 introduces some changes in library behaviour related to these export settings:  https://hinty.io/devforth/fix-webpack-imported-module-is-not-a-function-for-webpack5/
Answer: Setting module.exports allows the database_module function to be called like a function when required.  Simply setting exports wouldn't allow the function to be
exported because node exports the object module.exports references.  The following code wouldn't allow the user to call the function.
module.js
The following won't work.
exports = nano = function database_module(cfg) {return;}

The following will work if module.exports is set.
module.exports = exports = nano = function database_module(cfg) {return;}

console
var func = require('./module.js');
// the following line will **work** with module.exports
func();

Basically node.js doesn't export the object that exports currently references, but exports the properties of what exports originally references.  Although Node.js does export the object module.exports references, allowing you to call it like a function.

2nd least important reason
They set both module.exports and exports to ensure exports isn't referencing the prior exported object.  By setting both you use exports as a shorthand and avoid potential bugs later on down the road.
Using exports.prop = true  instead of module.exports.prop = true saves characters and avoids confusion.
Comment: @ajostergaard: It just happens to be the name of the [library](https://github.com/dscape/nano/blob/master/nano.js) the OP's example was taken from.  In the module, it allows the author to write things like `nano.version = '3.3'` instead of `module.exports.version = '3.3'`, which reads a little more clearly.  (Note that `nano` is a local variable, [declared a little before the module exports are set](https://github.com/dscape/nano/blob/3.3.7/nano.js#L17-45).)
Comment: @lime - thanks - I'm glad it's largely irrelevant because if it wasn't it would mean I'd completely misunderstood everything. :-| :)
Comment: @Asad Yes the function will export properly provided you set `module.exports`
Comment: Hey Lime, this is a pretty old answer but I hope you can clarify something. If I were to set `module.exports` but *not* `exports`, would my code still work? Thanks for any help!
Comment: I have no idea why they don't apply `set` `Proxy` for `exports`.
Answer: Basically the answer lies in what really happens when a module is required via require statement. Assuming this is the first time the module is being required.
For example:
var x = require('file1.js');

contents of file1.js:
module.exports = '123';

When the above statement is executed, a Module object is created. Its constructor function is:
function Module(id, parent) {
    this.id = id;
    this.exports = {};
    this.parent = parent;
    if (parent && parent.children) {
        parent.children.push(this);
    }

    this.filename = null;
    this.loaded = false;
    this.children = [];
}

As you see each module object has a property with name exports. This is what is eventually returned as part of require.
Next step of require is to wrap the contents of file1.js into an anonymous function like below:
(function (exports, require, module, __filename, __dirname) {
    //contents from file1.js
    module.exports = '123;
});

And this anonymous function is invoked the following way, module here refers to the Module Object created earlier.
(function (exports, require, module, __filename, __dirname) {
    //contents from file1.js
    module.exports = '123;
}) (module.exports,require, module, "path_to_file1.js","directory of the file1.js");

As we can see inside the function, exports formal argument refers to module.exports. In essence it's a convenience provided to the module programmer.
However this convenience need to be exercised with care. In any case if trying to assign a new object to exports ensure we do it this way.
exports = module.exports = {};

If we do it following way wrong way, module.exports will still be pointing to the object created as part of module instance.
exports = {};

As as result adding anything to the above exports object will have no effect to module.exports object and nothing will be exported or returned as part of require.
Comment: Lost me here `exports = module.exports = {};`
Comment: I don't see any advantage to add  `exports = module.exports = app;` at the last line of the code. It seems like the `module.exports` will get exported and we will never use `exports`, because again it's at the last line of the code. So, why don't we just simply add `module.exports = app;`
Comment: I think this should be the best answer, it explains why `func()` fails in @William's answer!
Answer: Initially,module.exports=exports , and the require function returns the object module.exports refers to.
if we add property to the object, say exports.a=1, then module.exports and exports still refer to the same object. So if we call require and assign the module to a variable, then the variable has a property a and its value is 1;
But if we override one of them, for example, exports=function(){}, then they are different now: exports refers to a new object and module.exports refer to the original object. And if we require the file, it will not return the new object, since module.exports is not refer to the new object.
For me, i will keep adding new property, or override both of them to a new object. Just override one is not right. And keep in mind that module.exports is the real boss.
Comment: Yeah, this is actually the real answer. It's concise and clear. Others may be right but full of fancy terms and not focus exactly on the answer for this question.
Answer: exports and module.exports are the same unless you reassign exports within your module.
The easiest way to think about it, is to think that this line is implicitly at the top of every module.
var exports = module.exports = {};

If, within your module, you reassign exports, then you reassign it within your module and it no longer equals module.exports. This is why, if you want to export a function, you must do:
module.exports = function() { ... }

If you simply assigned your function() { ... } to exports, you would be reassigning exports to no longer point to module.exports.
If you don't want to refer to your function by module.exports every time, you can do:
module.exports = exports = function() { ... }

Notice that module.exports is the left most argument.
Attaching properties to exports is not the same since you are not reassigning it. That is why this works
exports.foo = function() { ... }

Answer: JavaScript passes objects by copy of a reference
It's a subtle difference to do with the way objects are passed by reference in JavaScript.
exports and module.exports both point to the same object. exports is a variable and module.exports is an attribute of the module object.
Say I write something like this:
exports = {a:1};
module.exports = {b:12};

exports and module.exports now point to different objects. Modifying exports no longer modifies module.exports.
When the import function inspects module.exports it gets {b:12}
Comment: "JavaScript passes by reference" – **No.**
Comment: Best answer I read till here. But one question: if `const b = require()` gets me the `{b:12}`, how can I import it to get `{a:1}`?
Answer: I just make some test, it turns out that, inside nodejs's module code, it should something like this:
var module.exports = {};
var exports = module.exports;

so:
1:
exports = function(){}; // this will not work! as it make the exports to some other pointer
module.exports = function(){}; // it works! cause finally nodejs make the module.exports to export.

2:
exports.abc = function(){}; // works!
exports.efg = function(){}; // works!

3: but, while in this case
module.exports = function(){}; // from now on we have to using module.exports to attach more stuff to exports.
module.exports.a = 'value a'; // works
exports.b = 'value b'; // the b will nerver be seen cause of the first line of code we have do it before (or later)

Comment: Lyman, so `module.exports` is sort of the 'real-deal' that node goes off of but at some point you'll need to add all your `exports` to `module.exports` unless you're using a `exports.namespace` (case 2 above), which in that case seems to be like Node ran a `extends(module.exports, exports);` adding all 'namespaces' of `exports` to the `module.exports` object? In other words, if you're using `exports` then you probably want to be setting properties on it?
Answer: Here is a good description written about node modules in node.js in action book from Manning publication.
What ultimately gets exported in your application is module.exports. exports is set
up simply as a global reference to module.exports , which initially is defined as an
empty object that you can add properties to. So exports.myFunc is just shorthand
for module.exports.myFunc.
As a result, if exports is set to anything else, it breaks the reference between
module.exports and exports . Because module.exports is what really gets
exported, exports will no longer work as expected—it doesn't reference module
.exports anymore. If you want to maintain that link, you can make module.exports
reference exports  again as follows:
module.exports = exports = db;

Answer: To understand the differences, you have to first understand what Node.js does to every module during runtime. Node.js creates a wrapper function for every module:
 (function(exports, require, module, __filename, __dirname) {

 })()

Notice the first param exports is an empty object, and the third param module is an object with many properties, and one of the properties is named exports. This is what exports comes from and what module.exports comes from. The former one is a variable object, and the latter one is a property of module object.
Within the module, Node.js automatically does this thing at the beginning: module.exports = exports, and ultimately returns module.exports.
So you can see that if you reassign some value to exports, it won't have any effect to module.exports. (Simply because exports points to another new object, but module.exports still holds the old exports)
let exports = {};
const module = {};
module.exports = exports;

exports = { a: 1 }
console.log(module.exports) // {}

But if you updates properties of exports, it will surely have effect on module.exports. Because they both point to the same object.
let exports = {};
const module = {};
module.exports = exports;

exports.a = 1;
module.exports.b = 2;
console.log(module.exports) // { a: 1, b: 2 }

Also notice that if you reassign another value to module.exports, then it seems meaningless for exports updates. Every updates on exports is ignored because module.exports points to another object.
let exports = {};
const module = {};
module.exports = exports;

exports.a = 1;
module.exports = {
  hello: () => console.log('hello')
}
console.log(module.exports) // { hello: () => console.log('hello')}

Answer: I went through some tests and I think this may shed some light on the subject...
app.js:
var ...
  , routes = require('./routes')
  ...;
...
console.log('@routes', routes);
...

versions of /routes/index.js:
exports = function fn(){}; // outputs "@routes {}"

exports.fn = function fn(){};  // outputs "@routes { fn: [Function: fn] }"

module.exports = function fn(){};  // outputs "@routes function fn(){}"

module.exports.fn = function fn(){};  // outputs "@routes { fn: [Function: fn] }"

I even added new files:
./routes/index.js:
module.exports = require('./not-index.js');
module.exports = require('./user.js');

./routes/not-index.js:
exports = function fn(){};

./routes/user.js:
exports = function user(){};

We get the output "@routes {}"

./routes/index.js:
module.exports.fn = require('./not-index.js');
module.exports.user = require('./user.js');

./routes/not-index.js:
exports = function fn(){};

./routes/user.js:
exports = function user(){};

We get the output "@routes { fn: {}, user: {} }"

./routes/index.js:
module.exports.fn = require('./not-index.js');
module.exports.user = require('./user.js');

./routes/not-index.js:
exports.fn = function fn(){};

./routes/user.js:
exports.user = function user(){};

We get the output "@routes { user: [Function: user] }"
If we change user.js to { ThisLoadedLast: [Function: ThisLoadedLast] }, we get the output "@routes { ThisLoadedLast: [Function: ThisLoadedLast] }".

But if we modify ./routes/index.js...
./routes/index.js:
module.exports.fn = require('./not-index.js');
module.exports.ThisLoadedLast = require('./user.js');

./routes/not-index.js:
exports.fn = function fn(){};

./routes/user.js:
exports.ThisLoadedLast = function ThisLoadedLast(){};

... we get "@routes { fn: { fn: [Function: fn] }, ThisLoadedLast: { ThisLoadedLast: [Function: ThisLoadedLast] } }"
So I would suggest always use module.exports in your module definitions.
I don't completely understand what's going on internally with Node, but please comment if you can make more sense of this as I'm sure it helps.
-- Happy coding
Comment: I think they are unnecessarily complicated and confusing. It should be transparent and intuitive.
Comment: I agree. It may be useful for namespacing is some circumstances, but is generally not going to make or break anything.
Answer: I found this link useful to answer the above question.
http://timnew.me/blog/2012/04/20/exports-vs-module-exports-in-node-js/
To add to the other posts  The module system in node does
var exports = module.exports

before executing your code. So when you want to exports = foo  , you probably want to do module.exports = exports = foo  but using exports.foo = foo should be fine
Answer: This shows how require() works in its simplest form, excerpted from Eloquent JavaScript
Problem
It is not possible for a module to directly export a value other than the exports object, such as a function. For example, a module might want to export only the constructor of the object type it defines. Right now, it cannot do that because require always uses the exports object it creates as the exported value.
Solution
Provide modules with another variable, module, which is an object that has a property exports. This property initially points at the empty object created by require but can be overwritten with another value in order to export something else.
function require(name) {
  if (name in require.cache)
    return require.cache[name];
  var code = new Function("exports, module", readFile(name));
  var exports = {}, module = {exports: exports};
  code(exports, module);
  require.cache[name] = module.exports;
  return module.exports;
}
require.cache = Object.create(null);

Comment: I had to recreate this in Node and test a few things until I got, I suck. Basically, the inner function created for the module never even returns the exports object. So the "exports" object isn't actually reassigned in the module e.g. if you try to write exports = "this is now a string" directly. The object only exists as a reference. This is behaviour I don't think I've really picked up on properly until now.
Answer: Here is the result of
console.log("module:");
console.log(module);

console.log("exports:");
console.log(exports);

console.log("module.exports:");
console.log(module.exports);

Also:
if(module.exports === exports){
    console.log("YES");
}else{
    console.log("NO");
}

//YES

Note:
The CommonJS specification only allows the use of the exports variable to expose public members. Therefore, the named exports pattern is the only one that is really compatible with the CommonJS specification. The use of module.exports is an extension provided by Node.js to support a broader range of module definition patterns.
Answer: var a = {},md={};

//Firstly,the exports and module.exports point the same empty Object
exp = a;//exports =a;
md.exp = a;//module.exports = a;

exp.attr = "change";

console.log(md.exp);//{attr:"change"}

//If you point exp to other object instead of point it's property to other object. The md.exp will be empty Object {}
var a ={},md={};
exp =a;
md.exp =a;

exp = function(){ console.log('Do nothing...'); };

console.log(md.exp); //{}

Answer: From the docs

The exports variable is available within a module's file-level scope, and is assigned the value of module.exports before the module is evaluated.
It allows a shortcut, so that module.exports.f = ... can be written more succinctly as exports.f = .... However, be aware that like any variable, if a new value is assigned to exports, it is no longer bound to module.exports:

It is just a variable pointing to module.exports.
Answer: module.exports and exports both point to the same object before the module is evaluated.
Any property you add to the module.exports  object will be available when your module is used in another module using require statement. exports is a shortcut made available for the same thing. For instance:
module.exports.add = (a, b) => a+b

is equivalent to writing:
exports.add = (a, b) => a+b

So it is okay as long as you do not assign a new value to exports variable. When you do something like this:
exports = (a, b) => a+b

as you are assigning a new value to exports it no longer has reference to the exported object and thus will remain local to your module.
If you are planning to assign a new value to module.exports rather than adding new properties to the initial object made available, you should probably consider doing as given below:
module.exports = exports = (a, b) => a+b

Node.js website has a very good explanation of this.
Answer: "If you want the root of your module's export to be a function (such as a constructor) or if you want to export a complete object in one assignment instead of building it one property at a time, assign it to module.exports instead of exports." - http://nodejs.org/api/modules.html
Answer: Let's create one module with 2 ways:
One way
var aa = {
    a: () => {return 'a'},
    b: () => {return 'b'}
}

module.exports = aa;

Second way
exports.a = () => {return 'a';}
exports.b = () => {return 'b';}

And this is how require() will integrate module.
First way:
function require(){
    module.exports = {};
    var exports = module.exports;

    var aa = {
        a: () => {return 'a'},
        b: () => {return 'b'}
    }
    module.exports = aa;

    return module.exports;
}

Second way
function require(){
    module.exports = {};
    var exports = module.exports;

    exports.a = () => {return 'a';}
    exports.b = () => {return 'b';}

    return module.exports;
}

Answer: 1.exports -> use as singleton utility
2. module-exports -> use as logical objects such as service , model etc
Answer:
why both are used here

I believe they just want to be clear that module.exports, exports, and nano point to the same function - allowing you to use either variable to call the function within the file. nano provides some context to what the function does.
exports won't be exported (only module.exports will), so why bother overwriting that as well?
The verbosity trade-off limits the risk of future bugs, such as using exports instead of module.exports within the file. It also provides clarification that module.exports and exports are in fact pointing to the same value.

module.exports vs exports
As long as you don't reassign module.exports or exports (and instead add values to the object they both refer to), you won't have any issues and can safely use exports to be more concise.
When assigning either to a non-object, they are now pointing to different places which can be confusing unless you intentionally want module.exports to be something specific (such as a function).
Setting exports to a non-object doesn't make much sense as you'll have to set module.exports = exports at the end to be able to use it in other files.
let module = { exports: {} };
let exports = module.exports;

exports.msg = 'hi';
console.log(module.exports === exports); // true

exports = 'yo';
console.log(module.exports === exports); // false

exports = module.exports;
console.log(module.exports === exports); // true

module.exports = 'hello';
console.log(module.exports === exports); // false

module.exports = exports;
console.log(module.exports === exports); // true

Why assign module.exports to a function?
More concise! Compare how much shorter the 2nd example is:
helloWorld1.js: module.exports.hello = () => console.log('hello world');
app1.js: let sayHello = require('./helloWorld1'); sayHello.hello; // hello world
helloWorld2.js: module.exports = () => console.log('hello world');
app2.js: let sayHello = require('./helloWorld2'); sayHello; // hello world
Answer:
Each file you create is a module. module is an object. It has property called exports : {} which is empty object by default.
you can create functions/middlewares and add  to this empty exports object such as exports.findById() => { ...  }  then require anywhere in your app and use...
controllers/user.js
exports.findById = () => {
    //  do something
}

require in routes.js to use:
const {findyId} = './controllers/user'

Answer:
exports: it's a reference to module.exports object
both exports and module.exports point to the same object
until we change the reference of exports object

Example:

if exports.a = 10 then module.exports.a = 10

if we reassign exports object explicitly inside the code like
exports = {} now its lost the reference to module.exports
Answer: in node js module.js file is use to run the module.load system.every time when node execute a file it wrap your js file content as follow
'(function (exports, require, module, __filename, __dirname) {',+
     //your js file content
 '\n});'

because of this wrapping inside ur js source code you can access exports,require,module,etc..
this approach is used because there is no other way to get functionalities wrote in on js file to another.
then node execute this wrapped function using c++. at that moment exports object that passed into this function will be filled.
you can see inside this function parameters exports and module.
actually exports is a public member of module constructor function.
look at following code
copy this code into b.js
console.log("module is "+Object.prototype.toString.call(module));
console.log("object.keys "+Object.keys(module));
console.log(module.exports);
console.log(exports === module.exports);
console.log("exports is "+Object.prototype.toString.call(exports));
console.log('----------------------------------------------');
var foo = require('a.js');
console.log("object.keys of foo: "+Object.keys(foo));
console.log('name is '+ foo);
foo();

copy this code to a.js
exports.name = 'hello';
module.exports.name = 'hi';
module.exports.age = 23;
module.exports = function(){console.log('function to module exports')};
//exports = function(){console.log('function to export');}

now run using node
this is the output
module is [object Object]
object.keys id,exports,parent,filename,loaded,children,paths
{}
true

    exports is [object Object]
object.keys of foo:
name is function (){console.log('function to module exports')}
function to module exports
now remove the commented line in a.js and comment the line above that line
and remove the last line of b.js and run.
in javascript world you cannot reassign object that passed as parameter but you can change function's public member when object of that function set as a parameter to another function
do remember
use module.exports on and only if you wants to get a function when you use require keyword .
in above example we var foo = require(a.js); you can see we can call foo as a function;
this is how node documentation explain it
"The exports object is created by the Module system. Sometimes this is not acceptable, many want their module to be an instance of some class. To do this assign the desired export object to module.exports."
Answer:

Both module.exports and exports point to the same function database_module(cfg) {...}.

1| var a, b;
2| a = b = function() { console.log("Old"); };
3|     b = function() { console.log("New"); };
4|
5| a(); // "Old"
6| b(); // "New"

You can change b on line 3 to a, the output is reverse. The conclusion is:

a and b are independent.

So module.exports = exports = nano = function database_module(cfg) {...} is equivalent to:
var f = function database_module(cfg) {...};
module.exports = f;
exports = f;

Assumed the above is module.js, which is required by foo.js. The benefits of module.exports = exports = nano = function database_module(cfg) {...} is clear now:

In foo.js, since module.exports is require('./module.js'):
var output = require('./modules.js')();

In moduls.js: You can use exports instead of module.exports.

So, you will be happy if both exports and module.exports pointing to the same thing.

module.exports vs exports in Node.js


Why is air mixed with bypass air on the A/C of an aircraft?

Question: Air is taken from the compressors, then it is cooled by the air that comes from the ram air inlet. After that, it is compressed and cooled again by an expansion turbine. When finally air is condensed, it mixes with bypass bleed air. What is bypass bleed air?
Answer: In short
Bypass bleed air is a fraction of the bleed air coming from the core compressor. It's named like this because it doesn't cross the air cycle machine of the packs as does the regular bleed air.
On the following picture this bypass bleed air is identified as trim air. Its purpose is to be mixed with cooler bleed air from the packs to modulate the temperature in the different zones.
Mixing is done by the mixing and distribution unit (see more below).

Use of trim air on the Airbus A320 family. (Source: A319/A320/A321 ECS Familiarization and Training Manual)
Boeing has open a new approach for air conditioning and pressurization using ram air rather than bleed air. The first aircraft with this approach is the B787, this requires dedicated compressors.

Details
The air conditioning and pressurization systems on large airliners are quite similar. Here is the overall picture:

Air conditioning and a part of the pressurization are obtained using the environmental control system (ECS)
Bleed air, the high pressure air taken from the engine cores and APU, is very hot.
Ram air, the cool low pressure air taken from the aircraft belly, is used to cool the bleed air in heat exchangers. This ram air, which gets warmer in the process, is rejected in the atmosphere without entering the cabin. A fan is used to create the ram air flow when the aircraft is on the ground.
Air conditioning packs are mainly air cycle machines (refreshers) that receive pre-cooled bleed air and deliver air at ambient temperature. There are usually 2 or 3 packs for redundancy.Some bleed air bypasses the ACM and can be used later by the mixing unit.
Air from the packs goes to the mixing and distribution unit which role is to mix air from packs with air already in the cabin, and deliver the result to different zones of the aircraft. The unit can vary temperature according to zones by mixing packs output air and bypass bleed air. The unit also mixes air from the ground supply when at the gate and engines and APU are not running.
Air in the cabin is recirculated by two or more fans which return it to the mixing unit.
As air is pumped into the aircraft by the mixing unit, air also exits the aircraft through one or several outflow valve(s). The exact quantity of air leaving the aircraft is controlled so that the pressure inside the aircraft is at the required value.This value is usually expressed as cabin altitude, that is the altitude we would find this pressure in the standard atmosphere. Pressure is about 1013 hPa at sea level and then decreases continuously when altitude increases.However the cabin altitude doesn't climb as high as the aircraft because there would be an insufficient oxygen pressure in the cabin. The cabin altitude is kept proportional to the aircraft altitude, but usually the minimum of pressure is a value equivalent to 6,000 to 6,500 ft.
All those elements are driven by controllers that can be monitored and programmed by the crew.

Let's look at the ECS for the Airbus A320.

1. Location of elements

(When not specified, the source of the images is the A319/A320/A321 ECS Familiarization and Training Manual)

2. Packs
A view of a pack with the triangular ram air inlet (the ram air outlet has been removed):

The pack includes:

Two air-to-air heat exchangers: main (MHX) and primary (PHX). Ram air is used as the heat receiver fluid for both.
A centrifugal compressor (COMP) and a turbine (TURB). They compose the air cycle machine (ACM) which cools and reduces pressure of bleed air.
A reheater (RH), a condenser (COND) and a water extractor (WE) to dry bleed air.

3. Air cycle machine

4. Pack operation
A pack works this way:

Hot high pressure bleed air is directed to the PHX which cools it a bit so that it can be processed more efficiently by the ACM.
Cooled air is sent to the compressor. Increasing the pressure allows for more heat to be extracted in the next step. Air gets very hot again.
Compressed hot air is sent to the MHX which remove as much heat as possible, possibly below the ram air temperature, which is great while on the ground.
Cool air, which contains water vapor, goes to a reheater and a condenser to create liquid water, water is collected by the water separator. This water is reinjected into the ram air to cool it before it is used in the exchangers.
Cool air finally rotates the turbine which extracts energy from it to drive the compressor and a ram air fan. The energy loss produces a cool low pressure air which can be used in the cabin and cockpit.

The exact temperature and moisture of air delivered by the pack are obtained by mixing air from the ACM turbine, cooler air from the PHX and warmest bypass bleed air taken upstream the MHX.
Water extraction is controlled by adjusting the temperature, in the same way, of the airflow going through the condenser.
Bypass bleed air is also delivered by the pack to the mixing unit for zone temperature trimming.

5. Water extractor

Collected water is reinjected into ram air flow.

6. Air temperature and pressure at each step

FCV: Flow control valve (bleed air input)
Answer: You almost have the answer in your question; bleed air is hot, compressed air taken from the engine compressors.  Bypass bleed air here refers to some of that air which is bled off the engine, but not routed through the air cycle machine (pack).  When the air comes out of the pack, its really cold.  The pilot has a knob which blends the cold air from the pack with the hot bypass air to adjust the temperature that comes through the actual ductwork; this is similar to the blender box in a car.

For example, in this image taken from this answer on SE Aviation, the bleed air from the engine comes in at the top right corner, and you can see the line for bypass bleed air along the top of the diagram in the pipe labelled "hot air".
Answer: There are 4 phases to an internal combustion engine, even a gas turbine: suck, squeeze, bang, blow.

Suck: Air is sucked into the engine
Squeeze: The air is compressed by the turbine
Bang: The concentrated air is mixed with fuel and ignited.
Blow: The expanded gases from the ignited fuel push out the back of the jet

Bleed air is taken out of the engine after squeeze but before bang
Answer: The Environmental Control System (ECS) which supplies air to the cabin usally uses bleed air from the engines in most aircraft. The figure below shows the engine bleed air system in a Boeing 767.

Image from Commercial Airliner Environmental Control System- Engineering Aspects of Cabin Air Quality by Elwood H. Hunt et. al, from Boeing
The main air supply for the ECS usually comes from the compressor, where air is taken from high/low pressure areas. These are used during different phases of flight.
The air is sometimes taken from the bypass air of the engines for the purposes of cooling. As the air is compressed in the compressor, the temperature of the bleed air rises (especially the one from HP stage) and the bypass air is used to cool it.
Answer: These answers are all correct, however. It should be noted that there are 2 separate types of bypass bleed air involved in this air conditioning system.
 There is bypass air taken just downstream of the flow control valve at the entry to the pack system that goes straight to the trim air for cabin temp control.
 The other bypass bleed air is involved with preventing ice buildup in the condenser/water extractor. this is the air that flows through the bypass valve(BPV), bypassing the compressor and main heat exchanger to provide hot air downstream of the turbine. The valve opens based on difference in pressure due.
Answer: We recently had a NGS problem on a B-737. The fault was the air was too cold entering the system. Troubleshooting was accomplished and the pre-cooler valve on the engine supplying bleed air was stuck open. My question is, what effect, if any, would show up with the air conditioning system the bleed air is supplying>
Comment: Hi Mitchell,  Welcome to Av.SE!  That's a good question, and you should ask it as a NEW question.  In the format here, "question and answers," posts made as "answers" are expected to, well, provide an **answer** to the stated question.  So asking a follow-up question in this thread won't work well.  But this would be a good question on its own.


Motion Tracking - Link track to empty and move camera instead of empty

Question: I have some footage that I've added a single tracking point to and linked it to an empty. This successfully moves that empty in my scene in relation to the tracker and I can add objects into the scene and parent them to those empties and they stay in position. However, some of the objects I'm adding are in motion and have particle trails, and the trails do not behave correctly since the objects are moving around based on the movement of the empty, as well as their own keyframe animations. Is there a way to invert the "track to" constraint on the empty so that the translation of that empty is inverted and applied to the camera so that the camera is translating, and the empty is "pinned" to its initial position?
Comment: maybe you have to change some options of the particles, such as the gravity, etc.
Comment: Use the tracker for 2D stabilzation.
Answer: I did something similar to this to avoid having to do full camera solving and achieved it by converting the track into an f-curve and then using the scale tool to invert the track (scaling by -1 in the y-direction) for each of the channels. This produced an empty that moved in the opposite direction to the original footage which I could then track the camera to. This can be achieved as follows :
Create a new Empty to act as the target and add a 'Track To' constraint. Uncheck the 'Active Clip' checkbox and select the relevant the Movie Clip containing the track. Set the Object, Track, and Camera. This should result in the Empty following the chosen point in the footage.
Click the 'Constraint to F-Curve' button in the Constraint panel. This will remove the constraint and convert it into an F-Curve on the empty so we can then manipulate the F-Curves.
Select the Empty and open a Graph Editor window and make sure the mode is set to 'F-Curve. You should see F-Curves for its X, Y, and Z locations.
Press 'A' until none of the graphs are selected (each press will toggle all or none). Right-Click on the 'X Location' curve to select a point on it. Press 'L' to select all linked points (ie, the whole curve). Press 'S', 'Y', '-1', Enter to scale it by a factor of -1 in the Y direction only. Repeat for the 'Y' and 'Z' curves. This will reverse the direction of motion for the empty in each direction.
Select the camera and add a constraint to Track To the empty and the camera should now mimic the motion in the original footage (rather than its inverse).
If you need to adjust the point at which the camera is pointing you can use the F-Curve editor to select one of the curves again and move the entire curve up or down (right-click curve, press 'L' to select the whole curve, 'G' then 'Y') to adjust the position.


What is the difference in serving devotees of God and serving God?

Question: According to us, everything is form of God, but without knowing this concept also people could be serving people. There are many people in the world who does not worship Gods or do not know about such concepts as they have no opportunity. Even though many of them could be serving devotees who actually worship God. How do this scenario is handled in Sanathana Dharma? What difference does this make? Which is considered best, serving devotee or directly serving God?
Comment: Do you want to "serve" the **omnipotent** God? And do you think a **real** devotee of that Omnipotent, Omnipresent, Omniscient God, "needs" to be "served", at all? Now, about "serving" a "common" miserable human, who is getting fruits of HIS OWN Karma. How about you "help" that poor soul, realize the same Divinity in his own Self, that made you rise above all and think "_Vasudhaiva-Kutumbakam_"? **We don't "serve" anyone, but our OWN deep rooted desires.** People suffer, NOT because they lack something "outside" (that you intend to fulfill by "serving" them), rather the void is "inside".
Comment: Humans are Divine, an image of God. And **have you ever seen your image ever "serving" you?** Rather its always with you, but "on the darker side". It always does things what you do, but "on the darker side". So remain what you actually are, an image of God. Create lasting self-sufficient systems (like God Himself, Who made this perpetual creation), Inspire lost ones, make them realize their potential. The idea of serving, or the "_dasa_-culture", was a poison injected, by Victorian Catholic historians in Hinduism, to make it "Baptized" in a sense. Its had NEVER been a _Sanatan-Dharma_ thing.
Answer: There is no difference between serving a devotee and serving God. In fact the question need not even come up. Here is why:
Who is God? Where is He present?
Sri Krishna says thus in Bhagavad Gita 10:20:

I am the Self, O Gudakesa, seated in the hearts of all creatures. I am
  the beginning, the middle and the end of all beings.

So He is present in all. So there is no difference between serving one being vs another, whether they are devotees or God Himself, so long as one is aware of this fact that God resides in ALL.
Secondly, what is service? Does God need our service?
Sri Krishna says this in Bhagavad Gita 10:41 42

Know that all beautiful, glorious, and mighty creations spring from but a spark of My splendor.
  But what need is there, Arjuna, for all this detailed knowledge? With a single fragment of Myself I pervade and support this entire universe.

God can do everything. There is nothing He cannot do. Why does He need Our service? Who are we really serving. So there is no question of serving God. All service is merely gift or opportunity for us!
What about serving devotees of the One:
Sri Krishna says this in Gita 9:22 verse of assurance:

But those who worship Me with devotion, meditating on My transcendental form--to them I carry what they lack and preserve what they have.

So Lord Himself takes care of all needs of His devotees, so what is the meaning of us serving them. This question too does not arise. We are serving no-one nor is there a need to serve His devotees, for God Himself takes care of Him.
Finally the last point, which is 'better' service of the two.
This means that there is a result for service. If the result of X is better than the result of Y, then X > Y right? But Sri Krishna says this in His Bhagavad Gita 2:47

Thy right is to work only, but never with its fruits; let not the fruits of actions be thy motive, nor let thy attachment be to inaction

So God says that there should not be any attachment or desire for rewards when performing actions. Such duty is liberating and therefore becomes best. So then which produces better fruits: serving devotee or serving God? Neither, for the best is to serve WITHOUT thinking of rewards/fruits, in other words, just go ahead and SERVE, do not think which is better.
SO there is no difference. Go ahead and serve all beings, fixing your mind on God (all forms are nothing but His Forms - God is One) and without expecting any fruits in return for such service, because after all there is NO SUCH THING as service, because God does not need it, nor do the devotees. All the best sir!
This is just one possible interpretation from scriptures, and there may be many possible ones.
Comment: As for me, I personally believe in validity of all paths, Vishishtadvaita, Achintyabhedabheda, Dvaita and Advaita (although I mostly write advaitist comments). I believe this: all scriptures are like oranges and mangos. One must extract the sweet essence in them and discard the peels. It does not matter whether we crush them into juice and take it, or if we chew it ourselves manually! Similarly all the great Saints of this country gave us the ESSENCE present in Vedas and Upanishads. Only difference is their technique, the essence is ONE - sweet and unadulterated divinity. Thanks once again :)
Comment: When we help others, we are not really helping others, what we are doing is helping our own self. When we help others we are giving up the selfish desires of our own small egos. We learn that we can be happy when others are happy and we learn that "I eat through all mouths." and experience Oneness.
Comment: Nice Answer.  By the way, this reminds me of the beliefs of Thenkalais, one of the subsects of Sri Vaishnavism.  See this answer: http://hinduism.stackexchange.com/a/831/36 In the beginning of any Hindu ritual, you have to say a Sankalpam, and in that Sankalpam there is a line beginning with "Sri Bhagavatagya" meaning "I am doing this ritual as per the command of Bhagavan".  Advaitins follow that line with "Parameshwara Preethiyartham", meaning "for the pleasure of Parameshwara".
Comment: (continued) But Thenkalais don't even think they should be so arrogant as to have an expectation that their measly actions can increase the pleasure of Vishnu, so after "Sri Bhagavatagya" they just say "Bhagavat Kainkarya Rupam", meaning "as a form of service to Bhagavan."  So your statement "God can do everything. There is nothing He cannot do. Why does He need Our service?  All service is merely gift or opportunity for us!" sounds more like what a Thenkalai would say than what an Advaitin would say ;-)
Comment: @KeshavSrinivasan thank you so much. Glad that it resonates with the philosophy that you believe :). Have GREAT respect and reverence for Sri Ramanujacharya (and other Vaishnava saints) and his loving humility and sharanagati path which He propagated. Thanks alot for sharing the philosophical differences between the various schools of thoughts.
Comment: Good answer. Swami Vivekananda said that the only way to truly do karma worship of God was to help people. Ramakrishna Paramahamsa said 'I am the servant of the servant of God'. Christ said 'What you do to the least of you, you do to Me." Buddha offered his own life to be offered in a sacrifice in exchange for a goat that was about to be sacrificed.
Comment: @SwamiVishwananda thank you Swamiji. I am deeply touched at the Unity amongst the beliefs of the various saints whom you mentioned. Thank you for explaining their viewpoints.
Comment: @Sai By the way, I recently asked a question about the Sri Bhagavatagna line was talked to you about: http://hinduism.stackexchange.com/q/3986/36
Comment: @KeshavSrinivasan good intriguing question as usual! thanks for letting me know. will see if can find some sweet references for you :)


Stock buyer and seller information, and abuse of anonymous markets?

Question: Is it possible to know who offered/offers and who bought stock? If not, what prevents a group of people to buy and sell stocks between them to "fake" interest in that stock and pump up the price?
Comment: There already exist rules to catch the perpetrators for such actions in real time, which starts putting up red flags and alerts the authorities. You shouldn't be worried too much about it.
Comment: Even if a group buy&sell stocks between itself to "fake" interest and pump up price, it wouldn't make any financial gain because during the last trade before the group exits, it has already bought the shares for the artificially inflated price with its own capital, so selling it at that artificially inflated price wouldn't make any gains.
Answer: Yes, it is possible. Each transaction is identified and recorded, and the entities involved are identifiable. After all - how else would they be receiving/paying the money?
This is not public information, i.e.: you cannot "google" it, but if a suspicion arises - it can be easily uncovered by the authorities.
The suspicion usually arises in such schemes because of abnormalities in behaviors of the people involved, and the brokers (at least in the US) are obligated to report to the authorities. It can also come from fraud complaints of people who got skimmed on pump-and-dump scheme.
However, many times these schemes are done through shell entities and layered structures of limited liability entities that make it hard to pin point the actual individuals. These schemes are usually very short termed and the entities involved disappear before authorities even start investigating.
Those who do it - are very good at what they do, as most "successful" criminals. Those who are not so good - get caught.
Comment: Why is it not public information? Is it simply because there are no organizations to report this information to the public? Or because it is actually unlawful for this information to become public?
Answer: Detail for public consumption is usually limited to the clearing firm.
Large traders must register with the SEC, so they are presumably preemptively scrutinized.
Market manipulation is loosely defined in the law and by precedent, so brokers will not permit trading between accounts under their administration believed to be controlled by a single party even if you are innocently moving assets between accounts through trades in illiquid securities.


Is the idea of having a "trash" in smartphones namely iOS and Android a good idea?

Question: Looking at major operating systems, they all have the concept of trash, recycle bin or something similar. However, the same concept doesn't seem to be applied to smartphones. I know that iOS for example doesn't have a file management system similar to Mac where you deal with folders and files. But that doesnt mean you don't deal with files on your iPhone or iPad. And the idea of using a single account across all the devices makes it even harder to recover your files once they are deleted. Deleting a file from one machine will delete it from all the machines using the same account. So my question is, was it a bad idea not to have this feature in iOS or Android? What are some of the benefits/drawbacks of not having it in smartphones?
Answer: I guess there are well defined platform constraints explaining why a trash bin is not there for mobile ios. From an App point of view the concept of trashed data is kept contextual to that app. From an user point view I know that if I delete something from an app I will find it somewhere stored within that app.
I thing that, even if it was possible to have a trash bin, I would not personally. Need to use it on a mobile device, unlike to how I need to use it while on a desktop or laptop.
Answer: From what I know, iOS does not have a user accessible file system on its own. The way you work with files there is, that you simply share files being kept in applications like Mail or Dropbox with other applications that use them. That's why there's no trash bin too. It's because of limited disk space of these devices and going towards having everything stored in cloud. Android is similar, but can't tell the exact differences. Maybe others will know more?
Answer: As I know from experience, I do not delete things as much as i do on a desktop. I data relevant to apps can be cleaned out (atleast on Android through settings) easily and for other data, its all shared from your mail or dropbox - or to generalize - shared from the cloud, as pointed out by digsrafik. The camera app data or the Gallery data (on android) and other such data (sound and video clips) created is the only data on the phone, which again will be shared on cloud (if permitted by user) and this data can be deleted easily. So having a trash can on the phone screen would probably be unnecessary and might even waste screen space (although I think the earlier samsung phone like galaxy note had the trash icons).
Answer: iOS 8 introduced this new feature in Photo Album where deleted images go to a special folder called "Recently Deleted." This basically covers the concept of Trash for photos. I am not sure if other applications have something similar.
I think it's not a bad idea to have this concept implemented in file heavy apps. Things get deleted, either by accident or choice. So having a way back is I think not a bad idea.


US6108955 A patent seems to be expired

Question: After doing some more research. The patent us6108955a has expired.  So if that is the case then I should be able to start my company using this system without fear of any legal recourse.  Please tell me if I am wrong
Answer: After a patent has expired anyone may make, use, offer for sale, or sell or import the invention without permission of the patentee, provided that matter covered by other unexpired patents is not used.
There may be more active patents which have same technology with some modification/addition. You need to be careful of such inventions. For example,  if a patent for a simple shoe has expired, you may freely use it(exact technology) to sell your own shoe freely. However you may not sell a shoe with a shock absorber which may be different active patent.

US6108955 A patent seems to be expired


Can I use a Catalyst 2960-S for iSCSI?

Question: I need to set up a modest iSCSI SAN with a few ESX hosts and one storage array. Can I get by using a Catalyst 2960-S or do I need to upgrade? Are there any special tweaks I need to make to the switch in order to handle iSCSI? The switch will be dedicated to the SAN; no other traffic except management will be present.
Comment: Speaking as someone who started working in an environment where 2960 switches were used for iSCSI - don't do it! We experienced regular target logouts due to full buffers. @nicotine 's answer below is a very good one.
Comment: @JStretch: ¿ tag edit ? Thoughts on making these "cisco-catalyst" instead of the specific model numbers? I've been editing lower-level users' tags... but didn't want to step on your toes :)
Comment: @Craig I'm no one special; feel free to hack up my posts. I've edited the tag, good idea!
Comment: @pauska Given that there are many environments where a 2960S is an *upgrade*, is it *always* a mistake to use this class of switch for storage traffic? (even for small sites)
Comment: @ewwhite it's hard to say - a small shop with a not-so-fast SAN and not many hosts could probably work just fine on them. Our troubles started when we added a EMC VNX to the mix, which was a much much faster SAN than our previous one. Maybe Cisco isn't the best way for those SMB customers. I know that newer Dell PowerConnect models have alot more buffering plus DCB features.
Answer: Given that the Cat2960-S is a desktop/access switch, with very, very small buffers, you would likely experience a lot of output drops.  A datacenter switch, such as a 4948E, would be a better choice for an iSCSI application.
To understand the reasoning behind this, you have to remember that an ethernet switch is either transmitting, or not transmitting on a specific port.  If traffic arrives on port 1 for port 2, and port 3 is already sending traffic to port 2, the traffic from port 1 has to be buffered until there's a gap in the traffic from 3 to 2.  If the buffer fills, additional traffic will be dropped.  The term "microburst" is used to reference traffic that, over time, is well below the limit for the interface, but occasionally bursts to cause output drops.
I am not as familiar with the 2960-S platform, but enabling QoS (without extensive tuning, see comments below) on it would probably be a bad idea; that would actually increase the number of output drops.  Enabling QoS splits your very small buffers into 4 even smaller buffers, and most traffic will hit only one of them.
Comment: Agreed on everything except about turning on QoS. At least on the Catalyst 3560/3750 the buffers can be tuned to perform better with mls qos than without it. This document is a good reference but it's for the 3560. https://supportforums.cisco.com/docs/DOC-8093
Comment: Edited answer to reflect that.  I'm unsure you'll actually get BETTER buffer performance with tuning -- the default when QoS is disabled tries to be as "fair" as possible and assumes all traffic is the same class.  Enabling it and tuning it may allow you to allocate more TX buffer to your downstream port, but QoS is in and of itself "managed unfairness"
Answer: http://packetlife.net/blog/2012/jan/16/catalyst-2960s-iscsi-optimization/
I followed Jeremy Stretch's post here a while back, moving our iSCSI SAN off a production switch onto a dedicated 3750G (stack of 2).  While I can't speak specifically to the 2960S, the tweaks offered in that post seem to be doing well on the 3750G's.  I've got a handful of OutDiscards (less than 100) but for 38 weeks of uptime, that seems pretty good for me.
This is running 4 ESXi hosts connected to 4 JetStor 1Gbps SANs and all links are aggregated.
I'll happily forward a "sh int counters" if you are interested.
(Ha! Just noticed it was Jeremy who asked this...sorry for linking your own blog post!)
Comment: Funny, I just remembered having come across this question in the past and thought it would make a good question. Completely forgot about that post.
Answer: I've had experience where customers have chosen to use the lower end switches (3750, 2960) for iSCSI and they are pretty terrible.
The issue gets even worse when you have your storage connected at a higher speed (like 10gbit for the SAN and 1gbit for the end servers).
I would look towards more of the DC class switches, if you want to stick with Catalyst then there is the 4900 series, alternatively you could venture in to the Nexus product line but it really depends on your price constraints.
Comment: I'm not sure how the old 3750 performs, but the 3750X has a _lot_ more buffers than 2960/2960-S.
Comment: They do indeed, however the DC class switches make the 3750X look like a desktop switch.
Answer: The Best Practice Guide for HP Lefthand iSCSI Storage stated, "For optimal switch performance, its recommended that the switch have at least 512 KB of buffer cache per port. Consult your switch manufacturer specifications for the total buffer cache. For example, if the switch has 48x 1 Gb ports, the recommendation is to have at least 24 MB of buffer cache dedicated to those ports. If the switch aggregates cache among a group of ports (for example, 1 MB of cache per 8 ports), space your storage modules and servers appropriately to avoid cache oversubscription."
I couldn't tell you what buffer cache the 2960S has per port, as it doesn't seem to be stated on the datasheet.

Can I use a Catalyst 2960-S for iSCSI?


When visiting northern India in September, where to begin weather-wise?

Question: For non-extreme hikers that want to play it safe, and are visiting India during September and early October - is it better to begin in the north-east (Sikim etc.) or north-west (Himachal-Pradesh etc.) weather-wise? Where is it warmer during the early winter?
Comment: @MarkMayo yhep, unless there are some other factors I'm not aware about
Comment: so an answer you'd accept is one that finds you climate conditions as well as hiking conditions for those areas?
Answer: Both Sikkim and Himachal Pradesh are going to be cold by virtue of altitude. You haven't exactly mentioned any specific places so I can't comment on which place will have colder weather, but considering typical 'places to visit' Sikkim is likelier to be the colder place (again, altitude)
Late September / early October is the end of monsoon season. So you can expect some rain in both places. You'll need to check weather reports as to what the actual conditions are. In case of roads being blocked due to heavy rains / local landslides blocking mountain roads, you're likelier to find more alternatives in Himachal Pradesh as transport links there are better (closer to populous centres in northern plains, etc. so it sees higher number of visitors).
Answer: September is one of the rainiest months. Consider North India to follow the climate from the Northern Hemisphere.
I suggest you start at the mid-north and work your way up. I.e - Gujarat/Rajastan/Delhi and then head north. Note, rainfall decreases as temperature dips into winter - and this happens significantly during September. Combine this with the fact that you are heading to higher altitudes and colder climate, you might see some very clear, cold but drier weather in October in the north.

If you are hiking, you'd probably want to see clearer skies and experience less rainfall. I suggest you leave the northern bits to October. That way the views are nicer. The Himalayas are more visible (and what a sight they are). Recommended.
If you are worried about feeling too cold and don't want to be in the North when the temperature dips, do it the other way (head down from Jammu/Kashmir/Himachal into Delhi).

I was travelling with some older family members and had to do it the latter way as they were finding it difficult with the cold weather up north.


Manual TX over Testnet - Error: exceeds block gas limit

Question: I was trying to follow: https://github.com/ThatOtherZach/Web3-by-Example/wiki/Send-Ether-Transaction to create and broadcast my first transaction on the ethereum testnet rinkeby.
However, I am struggling for hours after I managed to create an Address and to fund it (https://rinkeby.etherscan.io/address/0x24003FbB79cfA541eE32C59ef3A7424541f4AA01). I also tried the ropsten testnet, and with all possible gasPrice/gasLimit combinations (not even commenting them out helps) but same errors all the time:
Error: Returned error: exceeds block gas limit
My code:
<code> // Add the web3 node module
var Web3 = require('web3');

// Show web3 where it needs to look for the Ethereum node.
web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/Whm5Ks3VGzJMBGHh4MEx'));

// An extra module is required for this, use npm to install before running
var Tx = require('ethereumjs-tx');

// Used to sign the transaction. Obviously you SHOULD better secure this than just plain text
var privateKey = new Buffer('265f303edd16be057608a0810414c2889c24e7ce8e9e4a88ae5b8a561c26935a', 'hex');

 // The receiving address of the transaction
var receivingAddr = ('0x29307EE93F49E9eB1425e40C9119b9Cb6e39d9B5');

// Value to be sent, converted to wei and then into a hex value
var txValue = web3.utils.numberToHex(web3.utils.toWei('0.001', 'ether'));
console.log(txValue);
// Data to be sent in transaction, converted into a hex value. Normal tx's do not need this and use '0x' as default, but who wants to be normal?
var txData = web3.utils.asciiToHex('hi');

console.log('gasprice1');

var rawTx = {
  nonce: '1', // Nonce is the times the address has transacted, should always be higher than the last nonce 0x0#
  gasPrice: '0x38d7ea4c68000', // '0x14f46b0400', // Normal is '0x14f46b0400' or 90 GWei
  gasLimit: '2100000', //'0x2710', // Limit to be used by the transaction, default is '0x55f0' or 22000 GWei
  to: receivingAddr, // The receiving address of this transaction
  value: txValue, // The value we are sending '0x16345785d8a0000' which is 0.1 Ether
  data: txData // The data to be sent with transaction, '0x6f6820686169206d61726b' or 'oh hai mark'
}

console.log(rawTx); // This is used for testing to see if the rawTx was formmated created properly, comment out the code below to use.

var tx = new Tx(rawTx);
tx.sign(privateKey); // Here we sign the transaction with the private key

var serializedTx = tx.serialize(); // Clean things up a bit

console.log(serializedTx.toString('hex')); // Log the resulting raw transaction hex for debugging if it fails to send

web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex')) // Broadcast the transaction to the network
.on('receipt', console.log); // When a receipt is issued, log it to the console
</code>
If I use the values from https://github.com/ethereumjs/ethereumjs-tx
gasPrice: '0x09184e72a000',
gasLimit: '0x2710', I get:
Error: Returned error: intrinsic gas too low
Following error with this setup:
{ nonce: '0x00',
  gasPrice: '0x09184e72a000',
  gasLimit: '0x2710',
  from: '0xED54EbBC73C7fb8B6607547b7541D8799708D93B',
  to: '0xB29d0bDe21FF7f1a89eBEd0D9c40cA9f71119D7C',
  value: '0x38d7ea4c68000',
  chainId: '3',
  data: '0x737072656164' }
Error: Returned error: insufficient funds for gas * price + value
Comment: Starting this code with "node C:/Programs/code_snippets/create-wallet.js".
Comment: Changed gasPrice: '0x38d7ea4c68000',
  gasLimit: '2100000',
TO

gasPrice: web3.utils.toHex(20000000000),
  gasLimit: web3.utils.toHex(800000), ´
Now nothing happens, no error no nothing :
Answer: Changed gasPrice: '0x38d7ea4c68000', gasLimit: '2100000', TO gasPrice: web3.utils.toHex(20000000000), gasLimit: web3.utils.toHex(800000), ´  Now it works!


Leaking tile shower at corner near glass door

Question: We bought our house in Fresno, CA new in 2004. After about 4-5 years we noticed the upstairs master shower was leaking as evidenced by damage to ceiling in room directly below it. We contacted the home builder for repair work (in California they warranty all new construction for 10 years by law). Their general maintenance crew did a shower pan test that showed the shower was leaking at the corner where the glass door meets the wall and door well. The glass door has a gutter that runs all the water that falls on the door to this corner. After inspecting the corner we noticed the grout line was cracked, likely from the new house settling. It was unclear if the pan was not installed correctly or if the leak was high enough to get around the pan. The home builder, in consult with the tile subcontractor, decided to clean the grout line and lay new grout. This was done and they then placed a hardy amount of silicone over the repair for good measure. Fast forward another 5 years and the problem has returned but much worse, now I am out of the warranty period and want to repair it myself. I am good at general construction and tile work but have never installed or repaired a shower pan. I removed the glass door framing to get at the grout line and found the silicone they applied during the fix had mostly pealed up and was covered with black mold on the underside. I used a razor blade to remove the old grout which was also dark gray in color and very "rubbery" in texture, no longer tan and hard like this grout usually is. I fear the mold grew up from under the tile and thru the grout line but have never seen that happen before? I'm considering several potential solutions: (1) regrout with high quality epoxy grout and call it good (!?), (2) fill the open grout line with silicone in hopes of a better more flexible seal over time, or (3) start tearing up tile to see see if pan is in good working order and go from there. Option three seems like best long term solution but am I getting in over my head? Thanks in advance for any help or suggestions.
Comment: Thanks user81381 for the input. I was Thinking the same, I think I will do a pan test this week. The last pan test showed it only leaked when water reached near the top of the curb. This is the reason we figured it was the grout crack at the top corner of the curb. The thinking was perhaps water was getting under the grout and routing over the curb into the floor.
Answer: once a pan is compromised, its best to replace it. by now it is almost certainly 100% saturated and clearly isnt doing its job. the longer it goes the more damage to the structure it will cause, not to mention mold. the tile in the picture is all square set meaning you may be able to take the tile out about 2 ft above the pan to do a replacement. assuming you can get new tile that matchs the old.
Answer: A) The gutter on the shower door should not be sloped back to that corner, it should be sloped to the opposite side
B) The curb was not constructed properly because it should have been sloped back toward the shower pan such that any water landing on the top of the curb would roll back in rather than out toward the bathroom floor.
C) The shower pan waterproofing membrane (whatever the method) is supposed to continue up and over the curb and up the wall above the curb, it seems that your enclosure was not waterproofed correctly. I say this because the small amount of settling represented by the crack should not have compromised the waterproof membrane.
I would, unfortunately, recommend tile removal. A "second place" temporary alternative would be your "Option 2", waterproof silicone caulk.
Comment: Thanks Jimmy for the input. Unfortunately the lighting in my bathroom is not great and my pictures suffered, to be clear the curb does in fact slope back towards the shower drain and not out into the bathroom. As for the fix, I was afraid that would be the answer. Do you think the membrane can be repaired by pulling back just 2-3 rows of tile? I was thinking about resloping the gutter in the other direction as you mention but then when opening the door to get out of the shower water would run all over the bathroom floor.
Answer: The floor outside the shower looks damp which does suggest the shower pan is leaking and in need of a proper repair. But, before I started removing tiles (with the associated risk of breaking them) I'd peel back the carpet, clean up the damp and then cut a hole in the floor in a safe place so that I could look under the pan. That would tell me how bad the damage was under the pan. You may be able to see where it's leaking by shining a torch through the gap in the mortar. (I'd actually start with small hole and a boroscope to minimise what I had to repair if I got lucky and it was dry under there.)
If under the pan looks good I'd clean it all down with mold and mildew remover, let it all dry out, and then reseal the crack with silicone sealant. I wouldn't bother with grout, it tends to crack at joints like that where two planes meet. That your existing tiles look so clean suggests that the original sealant didn't stick very well - use a sealant trowelling tool to create a functional seal with enough overlap. It'll probably last another 5 years.
Before you screw the patch of floor down, you can buy cheap moisture sensors on eBay which will alert you in good time to fix it if / when it happens again.


How to use certificates for Eduroam?

Question: I am trying to connect to an eduroam network with Ubuntu 12.04. I understand you need to use certificates to log in to eduroam. I have looked on the University of East London site, but from here I don't know what to do. Can someone help me understand how to connect to the UEL eduroam service
Answer: In 2022, Eduroam uses the following certificate on your laptop: <code>/usr/share/ca-certificates/mozilla/USERTrust_RSA_Certification_Authority.crt</code>
No need to download anything anymore.
Answer: you will need to get a certificate from your university, i am not sure if all of them use the same one - mine is  AddTrustExternalCARoot.crt
you can try it, dl from here - https://www.dropbox.com/s/65dm62gcegrhbmx/AddTrustExternalCARoot%20%283%29.crt
Comment: I have downloaded the certificates for UEL but what do I do with them now? How do I install them?
Answer: I've had the same problem. My college only had a tutorial for connecting with ubuntu 8.04. This tutorial stated, you should not use any certificate. With 12.10 i found this however is not the case. In my case I downloaded the certificate I found from another (foreign) university (AddTrustExternalCARoot.crt, like mentioned above) and used it to get a connection. I could use the instructions from other univesities as well, I only adjusted my username and password.

How to use certificates for Eduroam?