Feed aggregator

Valuebound: How to use Features module in Drupal 8 to bundle functionality in reusable module

Drupal Planet -

Features Module has played a significant role in deploying site configuration for Drupal 7. If you’ve ever build a site in Drupal 7, then possibly you have worked with the Features Module. However, CMI in Drupal 8 solved a lot of problems that we faced with Features in Drupal 7. In this blog, we will discuss - Why do we need Features Module in Drupal 8? What is the use of it? We will also attempt to export photo gallery feature.

Let’s take a use-case where you are working on a media and publishing company project and your client wants a feature of ‘…

Error'd: Have it Your Way!

The Daily WTF -

"You can have any graphics you want, as long as it's Intel HD Graphics 515," Mark R. writes.

 

"You know, I'm pretty sure that I've been living there for a while now," writes Derreck.

 

Sven P. wrote, "Usually, I blame production outages on developers who, I swear, have trouble counting to five. After seeing this, I may want to blame the compiler too."

 

"Whenever I hear someone complaining about their device battery life, I show them this picture," wrote Renan.

 

"Prepaying for gas, my credit card was declined," Rand H. writes, "I was worried some thief must've maxed it out, but then I saw how much I was paying in taxes."

 

Brett A. wrote, "Yo Dawg I heard you like zips, so you should zip your zips to send your zips."

 

[Advertisement] BuildMaster integrates with an ever-growing list of tools to automate and facilitate everything from continuous integration to database change scripts to production deployments. Interested? Learn more about BuildMaster!

First Ever Malvertising Campaign Uses JavaScript To Mine Cryptocurrencies In Your Browser

Slashdot -

An anonymous reader writes from a report via Bleeping Computer: Malware authors are using JavaScript code delivered via malvertising campaigns to mine different cryptocurrencies inside people's browsers (mostly Monero), without their knowledge. The way crooks pulled this off was by using an online advertising company that allows them to deploy ads with custom JavaScript code. The JavaScript code is a modified version of MineCrunch (also known as Web Miner), a script released in 2014 that can mine cryptocurrencies using JavaScript code executed inside the browser. Cryptocurrency mining operations are notoriously resource-intensive and tend to slow down a user's computer. To avoid raising suspicion, crooks delivered malicious ads mainly on video streaming and browser-based gaming sites (currently mostly Ukrainian and Russian sites). Both types of sites use lots of resources, and users wouldn't get suspicious when their computer slowed down while accessing the site. Furthermore, users tend to linger more on browser games and video streaming services, allowing the mining script to do its job and generate profits for the crooks.

Read more of this story at Slashdot.

Researchers Find Antidepressants Increase Risk of Death

Slashdot -

Artem Tashkinov shares a report from Medical Xpress: Antidepressant medications, most commonly prescribed to reduce depression and anxiety, increase the risk of death, according to new findings by a McMaster-led team of researchers. It's widely known that brain serotonin affects mood, and that most commonly used antidepressant treatment for depression blocks the absorption of serotonin by neurons. It is less widely known, though, that all the major organs of the body -- the heart, kidneys, lungs, liver -- use serotonin from the bloodstream. Antidepressants block the absorption of serotonin in these organs as well, and the researchers warn that antidepressants could increase the risk of death by preventing multiple organs from functioning properly. Interestingly, the news about antidepressants is not all bad. The researchers found that antidepressants are not harmful for people with cardiovascular diseases such as heart disease and diabetes. This makes sense since these antidepressants have blood-thinning effects that are useful in treating such disorders. Unfortunately, this also means that for most people who are in otherwise good cardiovascular health, antidepressants tend to be harmful. The study has been published in the journal Psychotherapy and Psychosomatics.

Read more of this story at Slashdot.

Facebook Enabled Advertisers To Reach 'Jew Haters'

Slashdot -

ProPublica is reporting that Facebook "enabled advertisers to direct their pitches to the news feeds of almost 2,300 people who expressed interest in the topics of 'Jew hater,' 'How to burn jews,' or, 'History of why jews ruin the world.'" The organization even went so far as to test these ad categories by paying $30 to target those groups with three "promoted posts" -- in which a ProPublica article or post was displayed in their news feeds. Facebook reportedly approved all three ads within 15 minutes. From the report: After we contacted Facebook, it removed the anti-Semitic categories -- which were created by an algorithm rather than by people -- and said it would explore ways to fix the problem, such as limiting the number of categories available or scrutinizing them before they are displayed to buyers. In all likelihood, the ad categories that we spotted were automatically generated because people had listed those anti-Semitic themes on their Facebook profiles as an interest, an employer or a "field of study." Facebook's algorithm automatically transforms people's declared interests into advertising categories. [ProPublica provides a screenshot of their ad buying process on the company's advertising portal.] "There are times where content is surfaced on our platform that violates our standards," said Rob Leathern, product management director at Facebook. "In this case, we've removed the associated targeting fields in question. We know we have more work to do, so we're also building new guardrails in our product and review processes to prevent other issues like this from happening in the future."

Read more of this story at Slashdot.

Wisconsin State Legislature Signs Off On $3 Billion Foxconn Incentive Package

Slashdot -

On Thursday, legislators in the state of Wisconsin approved a nearly $3 billion incentive package for the Taiwanese electronics manufacturer, Foxconn, in exchange for it investing approximately $10 billion in the state and building a factory that could employ up to 13,000 workers. The legislation is now headed to Republican Governor Scott Walker's desk, where he is expected to give it his seal of approval. VentureBeat reports: The bill passed the Wisconsin State Assembly on a 64-31 vote, after previously passing the state senate on a 20-13 vote. The move signals the start of what will likely be an important experiment in just how much generous incentive packages can do to help create new tech hubs. Governor Walker has said that the Foxconn factory â" the company's first in the United States -- will help transform Wisconsin into "Wisconn Valley." While on a trade mission this week to Japan and South Korea, Governor Walker told reporters that many of the companies he met with on the trip were already "every interested in how they could come to Wisconsin and partner for that new ecosystem." However, there are still a few details that need to be finalized before Foxconn can start breaking ground -- most notably, where the company will build the factory. The factory was set to be built in either Kenosha or Racine County, Wisconsin, before Kenosha dropped out of the running earlier this week.

Read more of this story at Slashdot.

Spain Fines Facebook Over Tracking Users Without Consent

Slashdot -

Spain's Data Protection Authority has issued a 1.2 million euro fine against Facebook after it found three instances when the company collected data without informing users, as required by European Union privacy laws. Tom's Hardware reports: The AEPD found multiple issues with how Facebook gathered data on Spanish users. One of the issues was that Facebook collects data on ideology, sex, and religious beliefs, as well as personal tastes and web surfing habits without informing the users about how that data will be used. A second issue was that Facebook wasn't obtaining specific and informed consent from the users because the data it was offering them about the collection was not sufficiently clear. The company has been tracking both users and non-users of the service through the Like button across the web without informing them about this sort of tracking, nor about what it plans to do with the data. The company has said that the collection is done for advertising purposes before, but some purposes remain secret, according to the Spanish Data Protection Authority. The AEPD said this sort of collection doesn't comply with the EU's data protection regulations. Finally, the AEPD also noticed that Facebook has not been completely purging the data about users who had already deleted their accounts and that Facebook was making use of accounts' data that have been deleted for more than 17 months. Considering the data that has remained behind is no longer useful for the purpose for which it was collected, the agency considered this another serious infringement of EU privacy laws.

Read more of this story at Slashdot.

PreviousNext: Composing Docker Local Development: Xdebug (OSX)

Drupal Planet -

Share:

In this post, we will show the pain points of running Xdebug in a Docker local development environment and how we overcame them.

by nick.schuch / 15 September 2017

Xdebug is essential when it comes to local development.

Normally the hardest part about configuring Xdebug is setting the IP address which it should send its debugging data to (eg. PHPStorm).

Configuring this with Vagrant was very simple since we were able to use the following setting for it to "Just Work":

xdebug.remote_connect_back = 1

Remote Connect Back is awesome, it allows for Xdebug to send its debugger information back to the IP address making the web request, where PHPStorm is running.

However, running Xdebug with "Docker for Mac" (D4M) is hard. D4M runs over multiple networks:

  • OSX host
  • Linux VM

This means that the IP address Xdebug ends up sending data to is the IP address of the Linux VM.

Existing solutions in the Docker community usually end up with the developer running additional configuration that they have to manage:

eg. https://forums.docker.com/t/ip-address-for-xdebug/10460/21

To solve this we wrote a tool called "D4M TCP Forwarder", which receives requests being sent to a port on the D4M host and forwards them to the OSX users host IP.

https://github.com/nickschuch/d4m-tcp-forwarder

To add this to your project you simply add this service to your Docker Compose file:

xdebug: image: nickschuch/d4m-tcp-forwarder network_mode: host

The solution results in:

  • No configuration for a developer
  • Reusable solution for the community
Tagged Docker

Posted by nick.schuch
Sys Ops Lead

Dated 15 September 2017

Add new comment

KDE Plasma 5.11 Beta Released

Slashdot -

JRiddell writes: The original and best linux desktop has a new version, KDE Plasma 5.11 beta is out. UI improvements include a redesigned System Settings and notification history. Privacy improvements include Plasma Vault, which helps you store your files securely. Progress on Wayland support continues with many people now using it as their daily setup. The full changelog can be viewed here.

Read more of this story at Slashdot.

ISPs Claim a Privacy Law Would Weaken Online Security, Increase Pop-Ups

Slashdot -

An anonymous reader quotes a report from Ars Technica: The country's biggest Internet service providers and advertising industry lobby groups are fighting to stop a proposed California law that would protect the privacy of broadband customers. AT&T, Comcast, Charter, Frontier, Sprint, Verizon, and some broadband lobby groups urged California state senators to vote against the proposed law in a letter Tuesday. The bill would require Internet service providers to obtain customers' permission before they use, share, or sell the customers' Web browsing and application usage histories. California lawmakers could vote on the bill Friday of this week, essentially replicating federal rules that were blocked by the Republican-controlled Congress and President Trump before they could be implemented. The text and status of the California bill, AB 375, are available here. The letter claims that the bill would "lead to recurring pop-ops to consumers that would be desensitizing and give opportunities to hackers" and "prevent Internet providers from using information they have long relied upon to prevent cybersecurity attacks and improve their service." The Electronic Frontier Foundation picked apart these claims in a post yesterday. The proposed law won't prevent ISPs from taking security measures because the bill "explicitly says that Internet providers can use customer's personal information (including things like IP addresses and traffic records) 'to protect the rights or property of the BIAS [Broadband Internet Access Service] provider, or to protect users of the BIAS and other BIAS providers from fraudulent, abusive, or unlawful use of the service,'" EFF Senior Staff Technologist Jeremy Gillula wrote.

Read more of this story at Slashdot.

Apple's A11 Bionic Chip In iPhone 8 and iPhone X Smokes Android Handsets In Early Benchmarks

Slashdot -

MojoKid writes: Many of the new releases of Apple's iPhone bring with it a new A-series SoC (System on Chip) and Apple is keeping that tradition with the iPhone 8 and iPhone 8 Plus, and iPhone X. Each of those handsets sports a custom ARM-based A11 Bionic processor with six cores -- four high performance cores and two power efficiency cores. The two power efficiency cores will perform the bulk medial chores to maintain battery life, which Apple says will be 2 hours longer than the iPhone 7. However, for heavier workloads, the chip is capable of not only firing up its four high performance cores, but also all six cores simultaneously. If early leaked benchmarks are any indication, the A11 Bionic is going to be a benchmark-busting beast of a chip. A set of just-posted Geekbench scores reinforces that notion. Just prior to Apple announcing its newest iPhone models, Geekbench's database was updated with a new entry for an "iPhone 10,5" which we assume to be the iPhone X. Based on the scores recorded, in this one benchmark at least, the A11 CPU powering the iPhone X appears to be 50 to 70 percent faster than any Android handset on the market currently, even those powered by the new Qualcomm Snapdragon 835.

Read more of this story at Slashdot.

PSA: Google Will Delete Your Android Backups If Your Device Is Inactive For Two Months

Slashdot -

New submitter Vernon Chan writes: It was discovered that Google will automatically schedule to delete your Android device backups if it is inactive for more than two months. The issue was discovered by a Reddit user after his Nexus 6P was sent for a refund claim. He was using an old iPhone while he waited for an Android replacement device. When he glanced at his Google Drive Backup folder, he freaked out when he noticed his Nexus 6P backup was missing. He then stumbled upon this Google Drive help document regarding backup expirations: "Your backup will remain as long as you use your device. If you don't use your device for 2 weeks, you may see an expiration date below your backup. For instance: 'Expires in 54 days.'" Once a backup is deleted, there is zero chance for recovery.

Read more of this story at Slashdot.

Hyperloop One Reveals 10 Strongest Potential Hyperloop Routes In the World

Slashdot -

An anonymous reader quotes a report from TechCrunch: Hyperloop One wants to build a real, working Hyperloop -- but it'll need strong partners to make it a reality, across both industry and government. That's why, in part, it held a global competition requesting proposals for routes around the world. The winners of that competition have now been announced, and the resulting routes span the U.S., the U.K, Mexico, India and Canada. Hyperloop One has assessed each proposal from hundreds of teams who applied from around the world, examining the potential of each from the perspective of infrastructure, technology, regulatory environment and transportation concerns. As a result, it identified the strongest candidates [with four routes in the U.S., two routes in the U.K., one route in Mexico, two routes in India, and one route in Canada.] The next step for each of these winning teams will be a validation process conducted with Hyperloop One to do some in-depth analysis on each route, establishing things like ridership forecast and building a fully fleshed out business case for each. Hyperloop One will be hosting workshops in each of the above countries to help with this process, and to meet with stakeholders and help establish necessary partnerships. Overall, Hyperloop One points out that these winning teams represent a combined population of almost 150 million people, with routes that would link up 53 urban centers around the world and span a total distance of 4,121 miles).

Read more of this story at Slashdot.

You Are Already Living Inside a Computer

Slashdot -

An anonymous reader shares a report: Think about the computing systems you use every day. All of them represent attempts to simulate something else. Like how Turing's original thinking machine (PDF) strived to pass as a man or woman, a computer tries to pass, in a way, as another thing. As a calculator, for example, or a ledger, or a typewriter, or a telephone, or a camera, or a storefront, or a cafe. After a while, successful simulated machines displace and overtake the machines they originally imitated. The word processor is no longer just a simulated typewriter or secretary, but a first-order tool for producing written materials of all kinds. Eventually, if they thrive, simulated machines become just machines. Today, computation overall is doing this. There's not much work and play left that computers don't handle. And so, the computer is splitting from its origins as a means of symbol manipulation for productive and creative ends, and becoming an activity in its own right. Today, people don't seek out computers in order to get things done; they do the things that let them use computers.

Read more of this story at Slashdot.

Bitcoin Exchange BTCChina Says To Stop Trading, Sparking Further Slide

Slashdot -

Several Slashdot readers have shared this Reuters story: Chinese bitcoin exchange BTCChina said on Thursday that it would stop all trading from Sept. 30, setting off a further slide in the value of the cryptocurrency that left it over 30 percent away from the record highs it hit earlier in the month. China has boomed as a cryptocurrency trading location in recent years, as investors and speculators flocked to domestic exchanges that formerly allowed users to conduct trades for free, boosting demand. But that has prompted regulators in the country to crack down on the cryptocurrency sector, in a bid to stamp out potential financial risks as consumers pile into a highly risky and speculative market that has seen unprecedented growth this year. Just hours after BTCChina announced its closure, Chinese news outlet Yicai reported that the country plans to shut down all bitcoin exchanges by the end of September, citing financial sources in Shanghai.

Read more of this story at Slashdot.

We're Eating Plastics From Our Own Dirty Laundry

Slashdot -

Every time you wash your fleece jacket or other synthetic clothing, microscopic synthetic fibres are released and end up in our food supply and drinking water. From a report: These microfibres are so small -- visible only under a microscope -- that they bypass municipal filtration systems and are consumed by fish and other marine life. A team of women from Waterloo, Ontario is looking to solve that problem. They've designed something that looks a lot like a dryer sheet for your laundry machine. You'd be able to drop this reusable sheet, called PolyGone, into the laundry machine with your dirty clothes. It attracts and traps the microfibres so they can be recycled. They presented their work at the annual AquaHacking conference at the University of Waterloo on Wednesday. "With these fibres entering our food system and ending up on our plates, we are essentially eating polluted laundry," said co-founder Lauren Smith at the conference. The event saw five teams, including hers, compete for tens of thousands of dollars and entry into several local incubators and accelerator centres. Smith has a Masters degree in sustainability management from UW, specializing in water.

Read more of this story at Slashdot.

Google Hit With Gender Pay Discrimination Lawsuit

Slashdot -

An anonymous reader shares a report: Three female former Google employees have filed a lawsuit against the search giant alleging gender-based pay discrimination, as the Associated Press reported. The former employees, Kelly Ellis, Holly Pease and Kelli Wisuri, all left the company after being put on career paths within the company that they say would pay them less than their male counterparts.

Read more of this story at Slashdot.

Annertech: How to allow an Editor Choose the View Mode of an Entity Reference Field in Drupal 8

Drupal Planet -

How to allow an Editor Choose the View Mode of an Entity Reference Field in Drupal 8

Say you are building a website which has a 'Related Content' feature. Then say your client says something like "This is great, but all the related content looks like the teaser on the listing page. Can't we choose ourselves how we want it to look?" What's your response? You say yes, and you go install Display Suite or Panels or some other heavy duty module? Or, say yes and follow these neat little instructions. No one says no to clients, do they?

Here's what you need to do:

Pages

Subscribe to Heydon Consulting aggregator