Daniel Pocock: Australians stuck abroad and alleged sex crimes
My office door is on the second floor in front the major staircase in my building. I work with my door open so that my colleagues and my students know when I m in. The only time I consider deviating from this policy is the first week of the quarter when I m faced with a stream of students, usually lost on their way to class and that, embarrassingly, I am usually unable to help.
I made this poster so that these conversations can, in a way, continue even when I am not in the office.
Today, Gammu 1.37.0 has been released. As usual it collects bug fixes. This time there is another important change as well - improver error reporting from SMSD.
This means that when SMSD fails to connect to the database, you should get a bit more detailed error than "Unknown error".
Full list of changes:
Filed under: English Gammu 0 comments
I haven't written much yet about what I've been up to at work. Right now, I'm
making changes to the sources of a set of Docker images. The changes I'm making
should not result in any changes to the actual images: it's just a
re-organisation of the way in which they are built.
I've been using the btrfs storage driver for Docker which makes comparing
image filesystems very easy from the host machine, as all the image filesystems
are subvolumes. I use a bash script like the following to make sure I haven't
broken anything:
oldid="$1"; newid="$2";
id_in_canonical_form()
echo "$1" grep -qE '^[a-f0-9] 64 $'
canonicalize_id()
docker inspect --format ' .Id ' "$1"
id_in_canonical_form "$oldid" oldid="$(canonicalize_id "$oldid")"
id_in_canonical_form "$newid" newid="$(canonicalize_id "$newid")"
cd "/var/lib/docker/btrfs/subvolumes"
sumpath()
cd "$1" && find . -printf "%M %4U %4G %16s %h/%f\n" sort
diff -ruN "$oldid" "newid"
diff -u <(sumpath "$oldid") <(sumpath "$newid")
Using -printf means I can ignore changes in the timestamps on files which
is something I am not interested in.
If it is available in your environment, Lars Wirzenius' tool
Summain generates manifests that include a file checksum
and could be very useful for this use-case.
alias ls='ls --color=auto -N'
Unfortunately it doesn't actually revert to the previous behaviour,
but it's close enough.
Just a quick reply to Rhonda about Moby. You can t introduce him without telling about Go, which is the title who made him famous, very early in the age of electronic music (November 1990, according to wikipedia). Many attempted to remix this song (and Moby himself), but nothing s as good as the original version.
I had some pile of hosting requests in queue since half of January and my recent talk on FOSDEM had some impact on requests for hosting translations as well, so it's about time to process them.
New kids on the block are:
Second round includes:
Unfortunately I had to reject some projects as well mostly due to lack of file format support. This is still the same topic - when translating project, please stick with some standard format. Preferably what is usual on your platform.
If you like this service, you can support it on Bountysource salt or Gratipay. There is also option for hosting translations of commercial products.
Filed under: English Weblate 0 comments
Today is one of these moods. And sometimes one needs certain artists/music to foster it. Music is powerful. There are certain bands I know that I have to stay away from when feeling down to not get too deep into it. Knowing that already helps a lot. The following is an artist that is not completely in that area, but he got powerful songs and powerful messages nevertheless; and there was this situation today that one of his songs came to my mind. That's the reason why I present you today Moby. These are the songs:
So. I typo ed up some template code the other day. And once again I learned the importance of using several c++ compilers.
Here is a very reduced version of my code:
#include <utility>And let s start with the compiler I was testing with first. MSVC (2013 and 2015)
template <typename T> auto foo(const T& t) -> decltype(x.first)
return t.first;
int main()
foo(std::make_pair(1,2));
return 0;
main.cpp(8): error C2672: foo : no matching overloaded function foundIt is not completely clear from that error message what s going on, so let s try some other compilers: GCC (4.9-5.3)
main.cpp(8): error C2893: Failed to specialize function template unknown-type foo(const T &)
2 : error: x was not declared in this scopeThat s pretty clear. More compilers: Clang (3.3-3.7)
template <typename T> auto foo(const T& t) -> decltype(x.first)
2 : error: use of undeclared identifier xICC (13)
template <typename T> auto foo(const T& t) -> decltype(x.first)
example.cpp(2): error: identifier x is undefined(Yes. I mistyped the variable name used for decltype. Replacing the x with t makes it build). Thanks to http://gcc.godbolt.org/ and http://webcompiler.cloudapp.net/ for testing with various compilers.
template <typename T> auto foo(const T& t) -> decltype(x.first)
I deal with compromises often enough of PHP-based websites that I wish
to improve hardening.
One obvious way to improve things is to not serve PHP files which are
writeable by the webserver-user. This would ensure that things like
wp-content/uploads didn't get served as PHP if a compromise wrote
valid PHP there.
In the past using php5-suhosin would have allowd this via the
suhosin.executor.include.allow_writable_files flag.
Since suhosin is no longer supported under Debian Jessie I wonder if
there is a simple way to achieve this?
I've written a toy-module which allows me to call stat on every
request, and return a 403 on access to writeable files/directories. But
it seems like I shouldn't need to write my own code for this
functionality.
Any pointers welcome; happy to post my code if that is useful but
suspect not - it just shouldn't exist.
This post was written by Dirk Eddelbuettel and Christoph Sax and will be posted on both author's respective blogs. The seasonal package by Christoph Sax brings a very featureful and expressive interface for working with seasonal data to the R environment. It uses the standard tool of the trade: X-13ARIMA-SEATS. This powerful program is provided by the statisticians of the US Census Bureau based on their earlier work (named X-11 and X-12-ARIMA) as well as the TRAMO/SEATS program by the Bank of Spain. X-13ARIMA-SEATS is probably the best known tool for de-seasonalization of timeseries, and used by statistical offices around the world. Sadly, it also has a steep learning curve. One interacts with a basic command-line tool which users have to download, install and properly reference (by environment variables or related means). Each model specification has to be prepared in a special 'spec' file that uses its own, cumbersome syntax. As seasonal provides all the required functionality to use X-13ARIMA-SEATS from R --- see the very nice seasonal demo site --- it still required the user to manually deal with the X-13ARIMA-SEATS installation. So we decided to do something about this. A pair of GitHub repositories provide both the underlying binary in a per-operating system form (see x13prebuilt) as well as a ready-to- use R package (see x13binary) which uses the former to provide binaries for R. And the latter is now on CRAN as package x13binary ready to be used on Windows, OS-X or Linux. And the seasonal package (in version 1.2.0 -- now on CRAN -- or later) automatically makes use of it. Installing seasaonal and x13binary in R is now as easy as:
install.packages("seasonal")
which opens the door for effortless deployment of powerful deasonalization. By default, the principal function of the package employs a number of automated techniques that work well in most circumstances. For example, the following code produces a seasonal adjustment of the latest data of US retail sales (by the Census Bureau) downloaded from Quandl:
library(seasonal)
library(Quandl) ## not needed for seasonal but has some niceties for Quandl data
rs <- Quandl(code="USCENSUS/BI_MARTS_44000_SM", type="ts")/1e3
m1 <- seas(rs)
plot(m1, main = "Retail Trade: U.S. Total Sales", ylab = "USD (in Billions)")
This tests for log-transformation, performs an automated ARIMA model search, applies outlier detection, tests and adjusts for trading day and easter effects, and invokes the SEATS method to perform seasonal adjustment. And this is how the adjusted series looks like:
xp <- Quandl(code="FRED/VALEXPCNM052N", type="ts")/1e9
m2 <- seas(window(xp, start = 2000),
xreg = cbind(genhol(cny, start = -7, end = -1, center = "calendar"),
genhol(cny, start = 0, end = 7, center = "calendar"),
genhol(cny, start = 8, end = 21, center = "calendar")
),
regression.aictest = c("td", "user"),
regression.usertype = "holiday")
plot(m2, main = "Goods, Value of Exports for China", ylab = "USD (in Billions)")
which generates the following chart demonstrating a recent flattening in export activity measured in USD.
X-13ARIMA-SEATS is, but also just how easy it is to use X-13ARIMA-SEATS from R now that we provide the x13binary package automating its installation.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
After finishing the Talos Principle I immediately started to play the extension Road to Gehenna, but was derailed near completion by the incredible Portal Stories: Mel. Now that I finally managed to escape from the test chambers my attention returned to the Road to Gehenna. As with the pair Portal 2 and Portal Stories: Mel, the challenges are going up considerably from the original Talos Principle to the Road to Gehenna. Checking the hours of game play it took me about 24h through all the riddles in Road to Gehenna, but I have to admit, I had some riddles where I needed to cheat.
The Road to Gehenna does not bring much new game play elements, but loads of new riddles. And the best of all, playable on Linux! And as with the original game, the graphics are really well done, while still be playable on my Vaio Pro laptop with Intel integrated graphic card a plus that is rare in the world of computer games where everyone is expected to have a high-end nVidia or Radeon card. Ok, there is not much action going on where quick graphic computations are necessary, still the impression of the game is great.
The riddles contain the well known elements (connectors, boxes, jammer, etc), but the settings are often spectacular, sometimes very small and narrow, just a few moves if done in the right order, sometimes like wide open fields with lots of space to explore. Transportation between various islands suspended in the air is with vents, giving you a lot of nice flight time!
If one searches a lot, or uses a bit of cheating, one can find good old friends from the Portal series, burried in the sand in one of the world. This is not the only easter egg hidden in the game, there are actually a lot, some of which I have not seen but only read about afterwards. Guess I need to replay the whole game.
Coming back to the riddles, I really believe that the makers have been ingenious in using the few items at hand to create challenging and surprising riddles. As it is so often, many of the riddles look completely impossible at first glance, and often even after staring at them for tens and tens of minutes. Until (and if) one has the the a-ha effect and understands the trick. This often still needs a lot of handwork and trial-error rounds, but all in all the game is well balanced. What is a bit a pain similar to the original game are collecting the stars to reach the hidden world and free the admin. There the developers overdid it in my opinion, with some rather absurd and complicated stars.
The end of the game, ascension of the messengers, is rather unspectacular. A short discussion on who remains and then a big closing scene with the messenger being beamed up a la Starship Enterprise, and a closing black screen. But well, the fun was with the riddles.
All in all an extension that is well worth the investment if one enjoyed the original Talos, and is looking for rather challenging riddles. Now that I have finished all the Portal and Talos titles, I am hard thinking of what is next looking into Braid
Enjoy!
As I've already mentioned in separate blog post we mostly had some security issues fun in past weeks, but besides that some other work has been done as well.
I've still focused on code cleanups and identified several pieces of code which are no longer needed (given our required PHP version). Another issue related to security updates was to set testing of 4.0 branch using PHP 5.2 as this is what we've messed up in the security release (what is quite bad as this is only branch supporting PHP 5.2).
In addition to this, I've updated phpMyAdmin packages in both Debian and Ubuntu PPA.
All handled issues:
Filed under: Debian English phpMyAdmin 0 comments
What happened in the reproducible
builds effort between January 24th
and January 30th:
d-devlibdeps stable accross locales. Original patch by Reiner Herrmann.
giotypefuncs.c is generated.readelf --decompress.
pkg(8) now supports SOURCE_DATE_EPOCH.
Ross Karchner did a lightning talk about reproducible builds at his work place and shared the slides.
My monthly report covers a large part of what I have been doing in the free software world. I write it for my donators (thanks to them!) but also for the wider Debian community because it can give ideas to newcomers and it s one of the best ways to find volunteers to work with me on projects that matter to me.
Debian LTS
I did not ask for any paid hours this month and won t be requesting paid hours for the next 5 months as I have a big project to handle with a deadline in June. That said I still did a few LTS related tasks:
No comment Liked this article? Click here. My blog is Flattr-enabled.
I've recently bought this beast and of course want to run it on Linux. Vendor does provide Linux drivers which even come with source, so that looked quite okay in the beginning.
However it turned out not to be that easy. First attempt was to install the 64-bit drivers and all I got from the printer is almost blank page with:
**** Unable to open the initial device, quitting.
Okay, that's not much helpful. Meanwhile I did install i386 system where it worked just fine. I started to smell some problems and looked at the source. It turned out to be almost complete, there was just single i386 binary, which is obviously needed by the driver.
Once realizing this, it was quite easy to make it work on 64 bit system as well:
dpkg --add-architecture i386
apt install libxml2:i386 libstdc++6:i386
Not that I'd be happy to run binary blob on my system, but at least printing now works.
Scanning from the device is easy - all you need to configure access to email and Samba and it works pretty without problems.
Filed under: Debian English 0 comments
I've recently bought this beast and of course want to run it on Linux. Vendor does provide Linux drivers which even come with source, so that looked quite okay in the beginning.
However it turned out not to be that easy. First attempt was to install the 64-bit drivers and all I got from the printer is almost blank page with:
**** Unable to open the initial device, quitting.
Okay, that's not much helpful. Meanwhile I did install i386 system where it worked just fine. I started to smell some problems and looked at the source. It turned out to be almost complete, there was just single i386 binary, which is obviously needed by the driver.
Once realizing this, it was quite easy to make it work on 64 bit system as well:
dpkg --add-architecture i386
apt install libxml2:i386 libstdc++6:i386
Not that I'd be happy to run binary blob on my system, but at least printing now works.
Scanning from the device is easy - all you need to configure access to email and Samba and it works pretty without problems.
Filed under: Debian English 0 comments
Been playing with user namespaces. But it seems we lack documentation, and moreover, it lacks coherent design as an API, probably because we are playing whack a mole on new holes as they are discovered.
As for the naming, seems to be called 'userns' in patch sets.
The API is unshare(CLONE_NEWUSER) with bunch of files in proc such as
/proc/self/uid_map,gid_map.
CAP_SETGID seems also be related but not sure if it's doing anything.
As I understand it, having a GitHub profile as a portfolio has become
an essential element in applying for entry-level computer programming
jobs insightfully, a friend of mine draws a comparison with the rise
of unpaid internships in other fields. Something about GitHub that
gets in the way of maintaining a presentable portfolio is that forks
of other people s repositories made just to submit a pull request can
crowd out repositories showcasing one s work. Sometimes pull requests
can take months to be responded to by upstream maintainers, leaving
unimpressive repositories sitting around on one s profile for all that
time.
The following Python script, clean-github-pr.py, forks a repository
and then sets various attributes of it to make it as obvious as GitHub
allows that it s just a temporary fork made in order to submit a pull
request. Invoke it like this:
$ clean-github-pr.py upstream-owner/repo-to-fork
You will need the PyGitHub python library, which on a Debian Stretch
system can be installed with apt-get install python-github.
#!/usr/bin/python
# clean-github-pr --- Create tidy repositories for pull requests
#
# Copyright (C) 2016 Sean Whitton
#
# clean-github-pr is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# clean-github-pr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with clean-github-pr. If not, see <http://www.gnu.org/licenses/>.
import github
import sys
import time
import tempfile
import shutil
import subprocess
import os
CREDS_FILE = os.getenv("HOME") + "/.cache/clean-github-pr-creds"
def main():
# check arguments
if len(sys.argv) != 2:
print sys.argv[0] + ": usage: " + sys.argv[0] + " USER/REPO"
sys.exit(1)
# check creds file
try:
f = open(CREDS_FILE, 'r')
except IOError:
print sys.argv[0] + ": please put your github username and password, separated by a colon, in the file ~/.cache/clean-github-pr-creds"
sys.exit(1)
# just to be sure
os.chmod(CREDS_FILE, 0600)
# make the fork
creds = f.readline()
username = creds.split(":")[0]
pword = creds.split(":")[1].strip()
g = github.Github(username, pword)
u = g.get_user()
source = sys.argv[1]
fork = sys.argv[1].split("/")[1]
print "forking repo " + source
u.create_fork(g.get_repo(source))
while True:
try:
r = u.get_repo(fork)
except github.UnknownObjectException:
print "still waiting"
time.sleep(5)
else:
break
# set up & push github branch
user_work_dir = os.getcwd()
work_area = tempfile.mkdtemp()
os.chdir(work_area)
subprocess.call(["git", "clone", "https://github.com/" + username + "/" + fork])
os.chdir(work_area + "/" + fork)
subprocess.call(["git", "checkout", "--orphan", "github"])
subprocess.call(["git", "rm", "-rf", "."])
with open("README.md", 'w') as f:
f.write("This repository is just a fork made in order to submit a pull request; please ignore.")
subprocess.call(["git", "add", "README.md"])
subprocess.call(["git", "commit", "-m", "fork for a pull request; please ignore"])
subprocess.call(["git", "push", "origin", "github"])
os.chdir(user_work_dir)
shutil.rmtree(work_area)
# set clean repository settings
r.edit(fork,
has_wiki=False,
description="Fork for a pull request; please ignore",
homepage="",
has_issues=False,
has_downloads=False,
default_branch="github")
if __name__ == "__main__":
main()
clean-github-pr.py, please send me a
patch or a pull request against the version in
my dotfiles repository.
Next.