17 private links
web-beautify is a formatting package of HTML, CSS and JavaScript/JSON for Emacs. It uses the command-line/node.js javascript formatter from http://jsbeautifier.org/ to format whole html, css, js or json files, or region.
You absolutely need to try installing multiple cursors:
https://github.com/magnars/multiple-cursors.el
It's in marmalade and melpa so just:
<pre>
M-x package-install multiple-cursors
</pre>
Autrefois appelé "psychose maniaco-dépressive", le trouble bipolaire perturbe notre humeur, exagère le ressenti de nos émotions sous l’influence de facteurs situationnels (pertes affectives, variations saisonnières, gains ou pertes d’argent...). Alors, vraie maladie ou trouble cognitif surévalué ?
L'émotion peut se définir comme une séquence de changements intervenant dans trois systèmes organiques : cognitif, psychophysiologique, moteur, or l'humeur est la manière dont une personne se sent à l'intérieur et comment elle ressent l'expérience de l'émotion. Un trouble de l'humeur notamment le trouble bipolaire se caractérise par une perturbation de cet état d'esprit. C'est le trouble cognitif qui chez le bipolaire perturbe la perception des émotions, il anticipe souvent un épisode thymique (up ou down). Cerveau émotionnel fonctionne comme un radar, il agit rapidement, il réagit sans prendre le temps d'analyser la situation, il est capable de déchiffrer les sentiments mais il a des jugements intuitifs parfois erronés. Il convient donc de savoir gérer ses émotions, en particulier les blessures narcissiques. La bipolarité exagère le ressenti des émotions. Les médicaments ne suppriment pas les émotions mais les rendent plus supportables.
Une conférence enregistrée en 2014.
Michel Bourin, Professeur de pharmacologie et psychiatre, a dirigé pendant 30 ans un laboratoire de recherches spécialisé dans le comportement animal et les modèles animaux d'anxiété et de dépression, expert sur les pharmacodépendances à l'Organisation mondiale de la Santé (OMS) et de psychiatre à temps très partiel dans une maison d'accueil spécialisée prés de Narbonne.
This page is a gallery of featured pictures that the community has chosen to be highlighted as some of the finest on Commons.
Awesome does not provide autostart functionality; not in the sense of freedesktop autostart specification and using *.desktop files. Below are some solutions for you to consider.
These advices can be useful to create a screen locker with slock
and xautolock
by simply adding xautolock -time 10 -locker slock
to ~/.config/awesome/rc.lua
We the undersigned affirm:
That Copyright is the workers’ right of recording artists, musicians, composers, and other creative workers.
That the Fair Trade protection of our natural and human environment that we demand as the basis for US trade agreements includes the right of working creators to protection from unfair competition with an open, corporate, ad funded black market.
That we support the recommendations of the AFM, SAG AFTRA, ASCAP, and BMI (as expressed in the Music Community’s response to the US Copyright Office)* as the basis for reforms needed to restore fair market conditions.
Together, we can fight for OUR future, one with economic justice for ALL those whose labor makes the internet possible: from the CWA workers who build and maintain its infrastructure; to the many exploited employees and subcontractors within digital industries; to the recording artists, film makers, and other creators whose ad monetized ‘content’ generates much of the digital environment’s vast wealth.
In solidarity,
We’ve all been there: that bit of JavaScript functionality that started out as just a handful of lines grows to a dozen, then two dozen, then more. Along the way, a function picks up a few more arguments; a conditional picks up a few more conditions. And then one day, the bug report comes in: something’s broken, and it’s up to us to untangle the mess.
sed
is stream editor, but can edit files directly too, with the following:
sed -i -e 's/foo/bar/g' filename
s
is used to replace the found expression "foo" with "bar"
g
stands for "global", meaning to do this for the whole line. If you leave off the g
and "foo" appears twice on the same line, only the first "foo" is changed to "bar".
-i
option is used to edit in place on filename.
-e
option indicates a command to run.
About a month ago, I blogged about my love/hate relationship with Eclipse. I was asked by a few people to share my tips on how I was able to speed it up so here we go… As a side note, this article is not about comparing IDEs, please refrain from displaying your hate for the IDE or your preference for another… This post is just about optimizations that help Eclipse run faster for those who use it. I’ve described each tip for Windows, Linux and MacOS users. Once you have gone through all the optimization tips, Eclipse should start within 10 seconds and run much smoother than before.
[edit]: most of those tips will speed up your Eclipse experience, not just the startup time. Classes will open faster, jumping from one definition to another will be faster. Viewing method javadocs will be faster… Unfortunately, none of that can be timed precisely so there is no specific benchmark about the actual speed gains for each tip.
When compared to NetBeans, I find that Eclipse is a lot slower, particularly when doing enterprise development. To try and speed Eclipse up, I’ve taken the JVM settings that NetBeans uses and applied them to Eclipse. The result is a vast improvement in performance. The default JVM settings in Eclipse aren’t optimal.
JVM GC tuning is a vast field that books have been written about. Mostly, we’re happy to accept whatever defaults the JVM figures out, at most cranking up heap and permGen size when we’re out of memory (again).
Besides the fact that a glorified Texteditor with a compiler attached needs gigabytes of memory, the darned thing was still slow, often becoming unresponsive for some seconds. This sucks.
Use promises
The Promise API is a new feature of ECMAScript 6, but it has good browser support already. There are also many libraries which implement the standard Promises API and provide additional methods to ease the use and composition of asynchronous functions (e.g. bluebird).
Promises are containers for future values. When the promise receives the value (it is resolved) or when it is cancelled (rejected), it notifies all of its "listeners" who want to access this value.
The advantage over plain callbacks is that they allow you do decouple your code and they are easier to compose.
Here is a simple example of using a promise:
function delay() {
// `delay` returns a promise
return new Promise(function(resolve, reject) {
// Only `delay` is able to resolve or reject the promise
setTimeout(function() {
resolve(42); // After 3 seconds, resolve the promise with value 42
}, 3000);
});
}
delay().then(function(v) { // `delay` returns a promise
console.log(v); // Log the value once it is resolved
}).catch(function(v) {
// Or do something else if it is rejected
// (it would not happen in this example, since `reject` is not called).
});
Applied to our Ajax call we could use promises like this:
function ajax(url) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
resolve(this.responseText);
};
xhr.onerror = reject;
xhr.open('GET', url);
xhr.send();
});
}
ajax("/echo/json").then(function(result) {
// Code depending on result
}).catch(function() {
// An error occurred
});
Describing all the advantages that promises offer is beyond the scope of this answer, but if you write new code, you should seriously consider them. They provide a great abstraction and separation of your code.
More information about promises: HTML5 rocks - JavaScript Promises
Scrum is now the default agile software development methodology. This management framework, which is "simple to understand but difficult to master", is used by 66% of all agile companies. After two extensive workshops, more than five years, and a couple hundreds of sprints working in Scrum, I have some points of criticism about it. I think it's not naturally conducive to good software, it requires too much planing effort on the part of the developers, and it inhibits real change and improvement. In the following, I will try to put these into more detail by organizing them around more concrete topics.
psql databasename < data_base_dump
As with everything that contains valuable data, PostgreSQL databases should be backed up regularly. While the procedure is essentially simple, it is important to have a basic understanding of the underlying techniques and assumptions.
Automatically enable HTTPS on your website with EFF's Certbot, deploying Let's Encrypt certificates.
Let’s Encrypt is a free, automated, and open certificate authority utilizing the ACME protocol.
The official client is called Certbot, which allows to request valid X.509 certificates straight from the command line.
Functions should always have a return value. Not just "get"-like functions, but also (perhaps even more important) the "set"-like functions. Scripts may not use this return value in many cases (ie. it's out of their scope to do anything about it), but in more advanced structures or test suites, the return value of a "set" function is very important (ie. "don't load X if Y was not set", or "Did the function correctly refuse to do X in scenario Y").