It provides a possible fallback in situations where Sys.timezone() fails to determine the system timezone. That can happen when e.g. the file /etc/localtime somehow is not a link into the corresponding file with zoneinfo data in, say, /usr/share/zoneinfo.
Duane McCully provided a nice StackOverflow answer with code that offers fallbacks via /etc/timezone (on Debian/Ubuntu) or /etc/sysconfig/clock (on RedHat/CentOS/Fedora, and rumour has it, BSD* systems) or /etc/TIMEZONE (on Solaris). The gettz micro-package essentially encodes that approach so that we have an optional fallback when Sys.timezone() comes up empty.
In the previous paragraph, note the stark absense of OS X where there seems nothing to query, and of course Windows. Contributions for either would be welcome.
There are many online sites that accept reading input from remote locations. For example a site might try to extract all the text from a webpage, or show you the HTTP-headers a given server sends back in response to a request.
If you run such a site you must make sure you validate the schema you're given - also remembering to do that if you're sent any HTTP-redirects.
Really the issue here is a confusion between URL & URI.
The only time I ever communicated with Aaron Swartz was unfortunately after his death, because I didn't make the connection. I randomly stumbled upon the html2text software he put together, which had an online demo containing a form for entering a location. I tried the obvious input:file:///etc/passwd
The software was vulnerable, read the file, and showed it to me.
The site gives errors on all inputs now, so it cannot be used to demonstrate the problem, but on Friday I saw another site on Hacker News with the very same input-issue, and it reminded me that there's a very real class of security problems here.
The following link shows the contents of /etc/hosts, and demonstrates the problem:
The output looks like this:.. 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0.0.1 stage 127.0.0.1 files 127.0.0.1 brettt.. ..
(Actually the actual output all newlines had been stripped. Weird.)
Despite reporting the problem to the author on Friday, and following up the report via Twitter this has not yet been fixed, but after four days I assume I'm not alone in spotting this.
From "Stop stealing dreams":
«Settling for the not-particularly uplifting dream of a boring, steady job isn’t helpful. Dreaming of being picked — picked to be on TV or picked to play on a team or picked to be lucky — isn’t helpful either. We waste our time and the time of our students when we set them up with pipe dreams that don’t empower them to adapt (or better yet, lead) when the world doesn’t work out as they hope.
The dreams we need are self-reliant dreams. We need dreams based not on what is but on what might be. We need students who can learn how to learn, who can discover how to push themselves and are generous enough and honest enough to engage with the outside world to make those dreams happen.»
This made me think that I know many hero stories based on "the chosen", like Matrix, like most superheros getting powers either from some entity chosing them for it, or from chance.
I have a hard time thinking of a superhero who becomes one just by working hard at acquiring and honing their skills: I can only think of Batman and Ironman, and they start off as super rich.
If I think of people who start from scratch as commoners and work hard to become exceptional, in the standard superhero narrative, I can only think of supervillains.
It makes me feel culturally biased into thinking that a common person cannot be trusted to act responsibly, and that only the rich, the chosen and the aristocrats can.
As a bias it may serve the rich and the aristocrats, but I don't think it serves society as a whole.
RProtoBuf provides R bindings for the Google Protocol Buffers ("Protobuf") data encoding and serialization library used and released by Google, and deployed as a language and operating-system agnostic protocol by numerous projects.
This version contains a contributed bug-fix pull request covering conversion of zero-length vectors, and adding native support for S4 objects. At the request / suggestion of the CRAN maintainers, it also uncomments a LaTeX macro in the vignette (corresponding to our recent JSS paper paper) which older R versions do not (yet) have in their jss.cls file.Changes in RProtoBuf version 0.4.6 (2016-09-08)
S4 objects are natively encoded (also PR #18)
The vignette based on the JSS paper no longer uses a macro available only with the R-devel version of jss.cls, and hence builds on all R versions
CRANberries also provides a diff to the previous release. The RProtoBuf page has an older package vignette, a 'quick' overview vignette, a unit test summary vignette, and the pre-print for the JSS paper. Questions, comments etc should go to the GitHub issue tracker off the GitHub repo.
…what we need is a tool that allows modules or profiles to optionally install content after their other setup steps
It’s never just the direct application X or feature Y that gets added. It’s the tools that enable X or Y that get added to core. And for a long time this generalized approach was considered enough.
What’s changing is that on top of the enabling tech we now strive to also add a more opiniated example, a more concrete and specific expression of those new capabilities. I’m reminded of of Stevey’s Google Platforms Rant: “A platform needs a killer app.”
It’s interesting to see this shift in balance and I’m curious to see how it will play out.Tags: drupalproductframeworkdrupalplanetSub title: A platform needs a killer app
A year ago I got tired of Jenkins and wrote a CI system for myself, Ick. It's served me well since, but it's a bit clunky and awkward and I have to hope nobody else wants to use it.
I've been thinking about re-architecting Ick from scratch, and so I wrote down some of my thinking about this. It's very raw, but just in case someone else might be interested, I put it online at ick2.
At this point I'm still thinking about very high level concepts. I've not written any code, and probably won't in the next couple of months. But I had to get this out of my brain.
Greetings from the DrupalCon Events Team, we have a few programming updates to share.
For the past few years we have been thrilled to offer live streaming of the DrupalCon keynotes and closing sessions. Unfortunately, we will not be live streaming these sessions in Dublin. To catch the action live, you will need to meet us in Dublin. The good news is that we have a top-notch archiving crew who will archive these sessions as quickly as possible.
Another year, another OMGWTFBBQ. By my count, we had 49 people (and a dog) in my house and garden at the peak on Saturday evening. It was excellent to see people from all over coming together again, old friends and new. This year we had some weather issues, but due to the delights of gazebo technology most people stayed mostly dry. :-)
Also: thanks to a number of companies near and far who sponsored the important refreshments for the weekend:
As far as I could tell, everybody enjoyed themselves; I know I definitely did!
We got a few shop owners together at DrupalCamp LA 2016, at UC Irvine to talk Drupal. This is Part 1 of 5 of that conversation, talking about using Drupal 7 or Drupal 8 for new projects that we’re building.Read more...
Keep a good performance while storing logs on your Drupal database.Fri, 2016-09-09 15:20By salva
In the world of Drupal, it's a common and best practice to disable the Dblog module (Database logging) on production sites, in favour of using the Syslog module, which will take care of logging all php errors, notices, or any custom log messages into the Unix system logs, removing the performance burden of writing them to the Drupal database.
There are scenarios in which this approach, while convenient to keep the site running smoothly, is rather problematic when troubleshooting issues that appear only in a given environment and under very specific conditions. For those, unless you can count with some custom logging system built for very specific aspects of a site, you are pretty much blind and unable to find the source of a bug.
We've recently had this problem in one of our sites, where several external systems were involved in the feature that we were trying to debug. Given that those systems couldn't be reached from a development environment, we needed a minimum amount of information to be kept on the Drupal database, so that it was easier to navigate and see the details than it is to sail through the syslog. For that, Pascal Morin wrote a new module called Selective Watchdog Backend (selectlog).So what's it?
The concept behind the Selective Watchdog Backend is quite simple: instead of sending all logs to the syslog, give developers some flexibility to choose what can be also sent to the Drupal database. That way, you ensure that everything is sent to the syslog as usual, but for very specific sections of your site, you still have a meaningful set of logs of what you might consider more important at any given point. The great thing of the module, is that it doesn't affect any other watchdog modules you may be using. It's just an addition on top of them.
Let's see a couple examples, of what could be common use cases:
Scenario 1: You have a complex integration with a 3rd party API, and all the site users make constant use of it. However, it's not very stable, and you need to assist your client by providing them with exact details of the points at which the API is failing to return the expected results. Of course you've already added watchdog entries for these cases when you wrote the module, because you're a smart developer, but now you need these entries to be surfaced on the Drupal site. With the selectlog module enabled, all you'd have to would be editing your settings.php file and add these lines:
$conf['selectlog'] = array( 'dblog' => array(
'your_api_integration_module' => '*',
That would log every watchdog entry of your custom module to the database, making it available under admin/reports/dblog.
Scenario 2: Some of your views are breaking on production and you don't manage to find the problem (this is less likely to happen, but it'll do for the sake of the explaining the module usage). To troubleshoot this, you want to store the watchdog entries from the views module in the database, but just those of a certain severity. To do so:
$conf['selectlog'] = array( 'dblog' => array(
'views' => array(
And that's it. Pretty neat and convenient. Hopefully we'll be promoting this sandbox to a full project soon. In the meantime, take our word that it works wonderfully. If you think it's going to be an useful feature on your site, I recommend checking out the details on the project page or the comprehensive README.md file included with the module. Enjoy your logs!
BlogViewport module ready for Drupal 8 BlogSpinning up a CentOS server for Drupal FAQHow do I find Drupal messages with the syslog module enabled? BlogDoing more with Drush sql-sanitize
Time to check out one of our favourite contrib modules for Drupal - The Coffee module. With a keyboard shortcut it displays a quicksearch moodal window that lets you navigate around in Drupal very quick and easy.
Every year since 2010 the Whitley Bay Film Festival has put on a programme of movies in my home town, often with some quirk or gimmick. A few years back we watched "Dawn Of The Dead" in a shopping centre—the last act was interrupted by a fake film-reel break, then a load of zombies emerged from the shops. Sometime after that, we saw "The Graduate" within a Church as part of their annual "Secret Cinema" showing. Other famous stunts (which I personally did not witness) include a screening of Jaws on the beach and John Carpenter's "The Fog" in Whitley Bay Lighthouse.August 14, 2016
This year I only went to one showing, Fritz Lang's Metropolis. Two twists this time: it was being shown in The Rendezvous Cafe, an Art-Deco themed building on the sea front; the whole film was accompanied by a live, improvised synthesizer jam by a group of friends and synth/sound enthusiasts who branded themselves "The Mediators" for the evening.August 14, 2016
I've been meaning to watch Metropolis for a long time (I've got the Blu-Ray still sat in the shrink-wrap) and it was great to see the newly restored version, but the live synth accompaniment was what really made the night special for me. They used a bunch of equipment, most notably a set of Korg Volcas. The soundtrack varied in style and intensity to suit the scenes, with the various under-city scenes backed by a pumping, industrial-style improvisation which sounded quite excellent.
I've had an interest in playing with synthesisers and making music for years, but haven't put the time in to do it properly. I left newly inspired and energised to finally try to make the time to explore it.
There has been some movement of late around adding some default content to the standard profile.
This was originally reignited by Roy Scholten in his getting something in the box post.
As author and co-maintainer of the default content module for Drupal 8, I wanted to share my thoughts on the potential of adding it to Drupal core.
At long last, the copy editing of the User Guide is done! (If you've been a member of this group for a while, you should know what I'm talking about; if not, go browse the archives at https://groups.drupal.org/documentation for the last 1.5 years or so). I'd like to thank everyone who helped with editing tasks, and especially Jojy Alphonso (jojyja), who did the vast majority of the copy editing. THANK YOU!
So, the guide is in very good shape, and I just made an official release of version 8.x-2.0, corresponding to Drupal Core 8.2.x (which is supposed to be released soon). It should be live on Drupal.org soon, in HTML format, for your reading pleasure (not sure exactly when, since the reduced Drupal Association staff is pretty busy, but we're working on it). I'll post a link in a comment here when that happens.
Meanwhile, you can go to the User Guide project page and download the release, which contains all of the source files (which are written in AsciiDoc markup language), as well as PDF, ePub, and Mobi ebook versions (those are in the "ebooks" folder/directory of the archive you get when you download the project).
Also... The next step will be to translate the User Guide into other languages. The enthusiastic and experienced Catalan and Hungarian language teams will be starting on that shortly, and refining the process so that hopefully the other language teams can get started soon as well. If you want to help translate the Guide, you should start by joining the translation team on https://localize.drupal.org for your language. Thanks!
Dublin is a great place to eat out.
You probably won’t be surprised to learn that Dublin has a pretty good selection of bars and restaurants and selecting just a few is a difficult task. This is most certainly not a comprehensive list of venues, but here is a selection of our favourites.
Let us begin with that most important institution: the full Irish breakfast!
I bought a laptop with only SSD drives a while ago and based on a limited amount of reading, added the "discard" option to my /etc/fstab file for all partitions and happily went on my way expecting to avoid the performance degradation problems that happen on SSD cards without this setting).
I was quite surprised to learn that my change in /etc/fstab accomplished nothing. Well, not entirely true, my /boot partition was still getting empty sectors reported to the SSD card.
Since my filesystem is on top of LVM and LVM is on top of an encrypted disk, those messages from the files system to the disk were not getting through. I learned that when I tried to run the fstrim command on one of the partitions and received the message that the disk didn't support it. Since my /boot partition is not in LVM or encrypted, it worked on /boot.
I then made the necessary changes to /etc/lvm/lvm.conf and /etc/crypttab, restarted and... same result. Then I ran update-initramfs -u and rebooted and now fstrim works. I decided to remove the discard option from /etc/fstab and will set a cron job to run fstrim periodically.
Also, I learned of some security implications of using trim on an encrypted disk which don't seem to outweigh the benefits.
DrupalCon is big. It's got hundreds of sessions. A similar amount of BoFs. Approximately 2,000 attendees. Social events left, right, and centre. It's not hard to get confused, miss things that you promised not to, and leave thinking "damn, I could have done that better". At Annertech, we're Ireland's most seasoned DrupalCon attendees. Here's our guide to making the most of it.
Only 20 days are left until we head to Dublin to join the DrupalCon 2016! It’s the first time that we, the Drupal agency team from Bright Solutions (which is the "birthplace" of Drop Guard), arrive at a Con only with our Drop Guard team, so we can focus on our most famous contribution to the Community: our update management service tool “Drop Guard”.
Yes, we’d be happy to show people the great values which Drop Guard provides - but most of all we look forward to personal and honest conversations to progress in our work and as part of the Community!
Drupal Drupal Planet Drupalcon