17 private links
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").
NAME
Major Hayden - a social nerd
SYNOPSIS
major [--admin systems|database] [--contributor] [--developer] [--educator]
[--leader] [--other]
SUMMARY
I’m a Linux Engineer with skills in database administration, system administration, application development and leadership. I enjoy connecting people with technology solutions that are easy to use, affordable, and sustainable over time. I'm familiar with, and a huge supporter of, the DevOps culture and how to make it work with a large team in a fast paced environment.
Information security has also been an interest of mine. As the Chief Security Architect for Rackspace, I led a team of senior Windows, Linux and networking engineers who were dedicated to increasing security within Rackspace and for our customers. We provided critical security advisement to the business as a whole and we fueled technical security projects that reduced risk, reduced product development cycle time, and increased customer confidence.
I was previously working on the OpenStack project and its integration with Citrix Xenserver and Nicira's networking stack. I also maintained our high-availability clusters, Debian packaging and various system tools and scripts. Our team created a highly automated continuous integration system with Jenkins that allowed us to test and deploy new code much more rapidly than before.
Use the mogrify
program to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. This tool is similar to convert
except that the original image file is overwritten (unless you change the file suffix with the -format
option) with any changes you request. See Command Line Processing
for advice on how to structure your mogrify
command or see below for sample usages of the command.
Unit testing in Javascript can be tedious and painful, but Testem makes it so easy that you will actually want to write tests.
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
Unless you are a MySQL performance tuning expert, it can be enormously challenging and somewhat overwhelming to locate and eliminate MySQL bottlenecks. While many DBAs focus on improving the performance of the queries themselves, this post will focus on the highest-impact non-query items: MySQL Server Performance and OS Performance for MySQL.
Most options can be set using their actual names in the my.cnf.