Skip to main content

Feed aggregator

Elementary, My Dear Linux User

Linux Journal - Wed, 02/11/2015 - 17:38

I suspect there are as many Ubuntu-based Linux distributions as there are all other distributions combined. Many of them are designed with a specific purpose in mind. Whether the desire is for a different looking desktop, custom kernel or just pre-installed packages, there's probably a version of *buntu out there to fit every need. more>>

Categories: Linux News

PyCon 2015: The Young Coder: Let's Learn Python

Montreal Python - Tue, 02/10/2015 - 00:00

We're once again excited to offer our free tutorials for kids! Called "The Young Coder: Let's Learn Python", we invite kids 12 and over to join us for a day of learning how to program using Python.

We first offered the Young Coders tutorial at PyCon 2013 in Santa Clara and it was an immediate hit. The followup blog post from that event is the most popular post in our blog's history. Kids came from all over to attend it. One flew from South Africa and helped teach other kids. I gave my laptop to a girl who took the tutorial and wanted to attend Richard Jones' PyGame tutorial the next day. Overall, it was so awesome to see kids so excited about learning, about computers, and about Python.

Last year, our second year offering the tutorial and our first year in Montréal, the tutorial was offered both in French and English. We're going to be offering the same this year: a French version of the tutorial will take place on Saturday April 11, and an English version takes place the next day, on Sunday April 12.

Whether you're bringing your kids along for the trip to Montréal or you're local and want to expose your kids to programming, this is a great way to get them interested. The curriculum has now been taught and refined at several events over the last several years, and the kids love it. After learning the basics of Python, through the basic data types and loops and comparisons, the end result is creating a game using the PyGame library. Having been around the room when the tutorial ends, it's one of the best times of PyCon, to see a room full of bright eyed kids who just learned how to tell a computer what to do.

Would your kids be interested in this? Are you a kid who is interested in this? Sign up today! (If you're actually a kid, have a parent sign you up)

http://www.eventbrite.com/e/pycon-2015-young-coders-tickets-15264181578

The tutorials start at 9 AM, break for lunch around 1 PM, and wrap up around 4 PM. Registration is limited to please sign up if you're interested.

See the full details of the program at https://us.pycon.org/2015/events/letslearnpython/

Categories: External Blogs

Real-Time Rogue Wireless Access Point Detection with the Raspberry Pi

Linux Journal - Mon, 02/09/2015 - 13:33

Years ago, I worked for an automotive IT provider, and occasionally we went out to the plants to search for rogue Wireless Access Points (WAPs). A rogue WAP is one that the company hasn't approved to be there. So if someone were to go and buy a wireless router, and plug it in to the network, that would be a rogue WAP. more>>

Categories: Linux News

Migrating from Drupal to Ikiwiki

Anarcat - Fri, 02/06/2015 - 18:02

TLPL; j'ai changé de logiciel pour la gestion de mon blog.

TLDR; I have changed my blog from Drupal to Ikiwiki.

Note: since this post uses ikiwiki syntax (i just copied it over here), you may want to read the original version instead of this one.

will continue operating for a while to
give a chance to feed aggregators to catch that article. It will also
give time to the Internet archive to catchup with the static
stylesheets (it turns out it doesn't like Drupal's CSS compression at
all!) An archive will therefore continue being available on the
internet archive for people that miss the old stylesheet.

Eventually, I will simply redirect the anarcat.koumbit.org URL to
the new blog location, . This will likely be my
last blog post written on Drupal, and all new content will be
available on the new URL. RSS feed URLs should not change.

Why

I am migrating away from Drupal because it is basically impossible to
upgrade my blog from Drupal 6 to Drupal 7. Or if it is, I'll have to
redo the whole freaking thing again when Drupal 8 comes along.

And frankly, I don't really need Drupal to run a blog. A blog was
originally a really simple thing: a web blog. A set of articles
written on the corner of a table. Now with Drupal, I can add
ecommerce, a photo gallery and whatnot to my blog, but why would I do
that? and why does it need to be a dynamic CMS at all, if I get so
little comments?

So I'm switching to ikiwiki, for the following reason:

  • no upgrades necessary: well, not exactly true, i still need to
    upgrade ikiwiki, but that's covered by the Debian package
    maintenance and I only have one patch to it, and there's no data migration! (the last such migration in ikiwiki was in 2009 and was fully supported)
  • offline editing: this is a a big thing for me: i can just note
    things down and push them when I get back online
  • one place for everything: this blog is where I keep my notes, it's
    getting annoying to have to keep track of two places for that stuff
  • future-proof: extracting content from ikiwiki is amazingly
    simple. every page is a single markdown-formatted file. that's it.

Migrating will mean abandoning the
barlow theme, which was
seeing a declining usage anyways.

What

So what should be exported exactly. There's a bunch of crap in the old
blog that i don't want: users, caches, logs, "modules", and the list
goes on. Maybe it's better to create a list of what I need to extract:

  • nodes
    • title ([[ikiwiki/directive/meta]] title and guid tags, guid to avoid flooding aggregators)
    • body (need to check for "break comments")
    • nid (for future reference?)
    • tags (should be added as \[[!tag foo bar baz]] at the bottom)
    • URL (to keep old addresses)
    • published date ([[ikiwiki/directive/meta]] date directive)
    • modification date ([[ikiwiki/directive/meta]] updated directive)
    • revisions?
    • attached files
  • menus
    • RSS feed
    • contact
    • search
  • comments
    • author name
    • date
    • title
    • content
  • attached files
    • thumbnails
    • links
  • tags
    • each tag should have its own RSS feed and latest posts displayed
When

Some time before summer 2015.

Who

Well me, who else. You probably really don't care about that, so let'S
get to the meat of it.

How

How to perform this migration... There are multiple paths:

  • MySQL commandline: extracting data using the commandline mysql tool (drush sqlq ...)
  • Views export: extracting "standard format" dumps from Drupal and
    parse it (JSON, XML, CSV?)

Both approaches had issues, and I found a third way: talk directly to
mysql and generate the files directly, in a Python script. But first,
here are the two previous approaches I know of.

MySQL commandline

LeLutin switched using MySQL requests,
although he doesn't specify how content itself was migrated. Comments
importing is done with that script:

echo "select n.title, concat('| [[!comment format=mdwn|| username=\"', c.name, '\"|| ip=\"', c.hostname, '\"|| subject=\"', c.subject, '\"|| date=\"', FROM_UNIXTIME(c.created), '\"|| content=\"\"\"||', b.comment_body_value, '||\"\"\"]]') from node n, comment c, field_data_comment_body b where n.nid=c.nid and c.cid=b.entity_id;" | drush sqlc | tail -n +2 | while read line; do if [ -z "$i" ]; then i=0; fi; title=$(echo "$line" | sed -e 's/[ ]\+|.*//' -e 's/ /_/g' -e 's/[:(),?/+]//g'); body=$(echo "$line" | sed 's/[^|]*| //'); mkdir -p ~/comments/$title; echo -e "$body" > ~/comments/$title/comment_$i._comment; i=$((i+1)); done

Kind of ugly, but beats what i had before (which was "nothing").

I do think it is the good direction to take, to simply talk to the
MySQL database, maybe with a native Python script. I know the Drupal
database schema pretty well (still! this is D6 after all) and it's
simple enough that this should just work.

Views export

[[!img 2015-02-03-233846_1440x900_scrot.png class="align-right" size="300x" align="center" alt="screenshot of views 2.x"]]

mvc recommended views data export on Lelutin's
blog. Unfortunately, my experience with the views export interface has
been somewhat mediocre so far. Yet another reason why I don't like
using Drupal anymore is this kind of obtuse dialogs:

I clicked through those for about an hour to get JSON output that
turned out to be provided by views bonus instead of
views_data_export. And confusingly enough, the path and
format_name fields are null in the JSON output
(whyyy!?). views_data_export unfortunately only supports XML,
which seems hardly better than SQL for structured data, especially
considering I am going to write a script for the conversion anyways.

Basically, it doesn't seem like any amount of views mangling will
provide me with what i need.

Nevertheless, here's the [[failed-export-view.txt]] that I was able to
come up with, may it be useful for future freedom fighters.

Python script

I ended up making a fairly simple Python script to talk directly to
the MySQL database.

The script exports only nodes and comments, and nothing else. It makes
a bunch of assumptions about the structure of the site, and is
probably only going to work if your site is a simple blog like mine,
but could probably be improved significantly to encompass larger and
more complex datasets. History is not preserved so no interaction is
performed with git.

Generating dump

First, I imported the MySQL dump file on my local mysql server for easier
development. It is 13.9MiO!!

mysql -e 'CREATE DATABASE anarcatblogbak;' ssh aegir.koumbit.net "cd anarcat.koumbit.org ; drush sql-dump" | pv | mysql anarcatblogbak

I decided to not import revisions. The majority (70%) of the content has
1 or 2 revisions, and those with two revisions are likely just when
the node was actually published, with minor changes. ~80% have 3
revisions or less, 90% have 5 or less, 95% 8 or less, and 98% 10 or
less. Only 5 articles have more than 10 revisions, with two having the
maximum of 15 revisions.

Those stats were generated with:

SELECT title,count(vid) FROM anarcatblogbak.node_revisions group by nid;

Then throwing the output in a CSV spreadsheet (thanks to
mysql-workbench for the easy export), adding a column numbering the
rows (B1=1,B2=B1+1), another for generating percentages
(C1=B1/count(B$2:B$218)) and generating a simple graph with
that. There were probably ways of doing that more cleanly with R,
and I broke my promise to never use a spreadsheet again, but then
again it was Gnumeric and it's just to get a rough idea.

There are 196 articles to import, with 251 comments, which means an
average of 1.15 comment per article (not much!). Unpublished articles
(5!) are completely ignored.

Summaries are also not imported as such (break comments are
ignored) because ikiwiki doesn't support post summaries.

Calling the conversion script

The script is in [[drupal2ikiwiki.py]]. It is called with:

./drupal2ikiwiki.py -u anarcatblogbak -d anarcatblogbak blog -vv

The -n and -l1 have been used for first tests as well. Use this
command to generate HTML from the result without having to commit and
push all:

ikiwiki --plugin meta --plugin tag --plugin comments --plugin inline . ../anarc.at.html

More plugins are of course enabled in the blog, see the setup file for
more information, or just enable plugin as you want to unbreak
things. Use the --rebuild flag on subsequent runs. The actual
invocation I use is more something like:

ikiwiki --rebuild --no-usedirs --plugin inline --plugin calendar --plugin postsparkline --plugin meta --plugin tag --plugin comments --plugin sidebar . ../anarc.at.html

I had problems with dates, but it turns out that I wasn't setting
dates in redirects... Instead of doing that, I started adding a
"redirection" tag that gets ignored by the main page.

Files and old URLs

The script should keep the same URLs, as long as pathauto is enabled
on the site. Otherwise, some logic should be easy to add to point to
node/N.

To redirect to the new blog, rewrite rules, on original blog, should
be as simple as:

Redirect / http://anarc.at/blog/

When we're sure:

Redirect permanent / http://anarc.at/blog/

Now, on the new blog, some magic needs to happen for files. Both
/files and /sites/anarcat.koumbit.org/files need to resolve
properly. We can't use symlinks because
ikiwiki drops symlinks on generation.

So I'll just drop the files in /blog/files directly, the actual
migration is:

cp $DRUPAL/sites/anarcat.koumbit.org/files $IKIWIKI/blog/files rm -r .htaccess css/ js/ tmp/ languages/ rm foo/bar # wtf was that. rmdir * sed -i 's#/sites/anarcat.koumbit.org/files/#/blog/files/#g' blog/*.mdwn sed -i 's#http://anarcat.koumbit.org/blog/files/#/blog/files/#g' blog/*.mdwn chmod -R -x blog/files sudo chmod -R +X blog/files

A few pages to test images:

  • http://anarcat.koumbit.org/node/157
  • http://anarcat.koumbit.org/node/203

There are some pretty big files in there, 10-30MB MP3s - but those are
already in this wiki! so do not import them!

Running fdupes on the result helps find oddities.

The meta guid directive is used to keep the aggregators from finding
duplicate feed entries. I tested it with Liferea, but it may freak out
some other sites.

Remaining issues
  • postsparkline and calendar archive disrespect meta(date)
  • merge the files in /communication with the ones in /blog/files
    before import
  • import non-published nodes
  • check nodes with a format different than markdown (only a few 3=Full
    HTML found so far)
  • replace links to this wiki in blog posts with internal links

More progress information in [[the script|drupal2ikiwiki.py]] itself.

Categories: External Blogs

Non-Linux FOSS: Homebrew

Linux Journal - Thu, 02/05/2015 - 14:04

I use OS X quite often during my day job. I'm able to tolerate it largely due to the terminal. If I couldn't do my work with green text on a black background, I think I'd go crazy (or crazier). Unfortunately, OS X doesn't come with all the command-line tools I need. That's where Homebrew comes in to save the day. more>>

Categories: Linux News

Many Drives, One Folder

Linux Journal - Wed, 02/04/2015 - 14:46

RAID is awesome, and LVM is incredibly powerful, but they add a layer of complexity to the underlying hard drives. Yes, that complexity comes with many benefits, but if you just want to spread your files across multiple storage locations, there's a much easier way. more>>

Categories: Linux News

You're the Boss with UBOS

Linux Journal - Tue, 02/03/2015 - 12:22

UBOS is a new Linux distro that I like for two reasons. One is that it works toward making it easy for muggles to set up their own fully independent personal home servers with little or no help from wizards. The other is that it comes from my friend Johannes Ernst. more>>

Categories: Linux News

February 2015 Issue of Linux Journal: Web Development

Linux Journal - Mon, 02/02/2015 - 12:52
Under Construction

I think it was in the late 1990s, possibly into the 2000s, when it was common to put a cutesy graphic on the bottom of your Web page letting everyone know your site more>>

Categories: Linux News

Montréal-Python 51: Ostentatory Pagination

Montreal Python - Sun, 02/01/2015 - 00:00

After a long holiday break, Montréal-Python returns with a special themed meeting on data. Data is the core of our job and makes up for one of the most dynamic areas in the Python world.

So we've put together a meeting to give you a good overview of Montréal's pythonista "Data Science" scene.

If you would like to discuss online about our meetings or with our speakers, please take a look at our brand new meetup.com page: http://www.meetup.com/Montreal-python.

Evening Program:

Marcin Swiatek: Introduction to the statsmodel library

(http://statsmodels.sourceforge.net/)

I have been using scipy.stats as my main library for all things statistics. And it was good and understandable. Recently, however, I needed to dive into some more advanced data exploration. Something people normally would use R for. Enter statsmodels. I think I got just enough hang of it to talk about it for few minutes and give the neophyte's account of its strengths and uses. We will work with an example data set to try and find something interesting in it...

Louis-Philippe Huberdeau: Les défis de l'intégration python 2.x et python 3.x avec pyZMQ

(https://wardenscanner.com/)

Présentation de l'architecture pyZMQ ainsi que des défis lors de l'interopérabilité avec des composantes vieillissantes.

Marc Tardif: R, shiver me Python

(http://www.immun.io/)

A Python project is more than just code; it's a lot of stuff like tests to make sure it works, documentation to describe how it works and graphs to measure how well it works. This presentation will demonstrate using R to visualize metrics produced by a project.

David Taylor: A day in the life of a Data Science Pythonista

(http://www.prooffreader.com/)

David Taylor of dtdata.io and prooffreader.com explains some of his personal data science projects, as well as the professional data science projects he does in order to afford to do personal data science projects.

When:

Monday, the February 9th 2015

Where:

UQÀM, Pavillion PK

201, avenue du Président-Kennedy

Room PK-1140

Comment

It's free, just join us!

Schedule:
  • 6:00pm — Doors open
  • 6:30pm — Presentations start
  • 7:30pm — Break
  • 7:45pm — Second round of presentations
  • 9:00pm — One free beer offered at Bénélux just across the street
We’d like to thank our sponsors for their continuous support:
  • UQÀM
  • Bénélux
  • w.illi.am/
  • Outbox
  • Savoir-Faire Linux
  • Caravan
  • iWeb
Categories: External Blogs

PostgreSQL, the NoSQL Database

Linux Journal - Thu, 01/29/2015 - 15:55

One of the most interesting trends in the computer world during the past few years has been the rapid growth of NoSQL databases. The term may be accurate, in that NoSQL databases don't use SQL in order to store and retrieve data, but that's about where the commonalities end. NoSQL databases range from key-value stores to columnar databases to document databases to graph databases. more>>

Categories: Linux News

HPC Cluster Grant Accepting Applications!

Linux Journal - Wed, 01/28/2015 - 13:34

Silicon Mechanics, Inc. has announced the open submission period for its 4th annual Research Cluster Grant Program.  This competitive grant will award two complete high performance compute clusters to two institutions of higher education and research. The competition is open to all US and Canadian qualified post-secondary institutions, university-affiliated research institutions, non-profit research institutions, and researchers at federal labs with university affiliations.

more>>

Categories: Linux News

Sharing Admin Privileges for Many Hosts Securely

Linux Journal - Wed, 01/28/2015 - 13:20

The problem: you have a large team of admins, with a substantial turnover rate. Maybe contractors come and go. Maybe you have tiers of access, due to restrictions based on geography, admin level or even citizenship (as with some US government contracts). more>>

Categories: Linux News

Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform

Linux Journal - Fri, 01/23/2015 - 12:24

Two open source titans put their rings together and joined forces to announce that Red Hat Enterprise Linux v7.1 beta is now available on the IBM Power Development platform. Last month Red Hat announced that v7.i beta supported IBM Power Systems based on little endian mode. more>>

Categories: Linux News

Designing with Linux

Linux Journal - Thu, 01/22/2015 - 14:15

3-D printers are becoming popular tools, dropping in price and becoming available to almost everyone. They can be used to build parts that you can use around the house, but more and more, they also are being used to create instruments for scientific work. more>>

Categories: Linux News

Wondershaper—QOS in a Pinch

Linux Journal - Wed, 01/21/2015 - 13:59

In past articles, I've discussed my BirdCam setup and how it automatically archives video footage from my bird feeders to YouTube every night. That's a really cool process, but unfortunately, it saturates my upstream bandwidth in the evening. more>>

Categories: Linux News

Ideal Backups with zbackup

Linux Journal - Mon, 01/19/2015 - 14:28

Data is growing both in volume and importance. As time goes on, the amount of data that we need to store is growing, and the data itself is becoming more and more critical for organizations. It is becoming increasingly important to be able to back up and restore this information quickly and reliably. Using cloud-based systems spreads out the data over many servers and locations. more>>

Categories: Linux News

Call for speakers for Montréal-Python 51: Ostentatory Pagination

Montreal Python - Thu, 01/15/2015 - 00:00

It is the start of a new year and we've decided that the data science will be honored at our next meetup, the first monthly event of 2015. If you are using Python to manipulate, change, vizualise, analyse or produce data, we would love to hear from you.

We are looking for speakers for short and longer presentation (5-45mins).

If you are willing to take this opportunity and come show us what you are doing, send us a blurb and give a small introduction to what you are doing at the following email address:

mtlpyteam@googlegroups.com

When:

Monday, the February 9st 2015

Schedule:
  • 6:00pm — Doors open
  • 6:30pm — Presentations start
  • 7:30pm — Break
  • 7:45pm — Second round of presentations
  • 9:00pm — One free beer offered at Bénélux just across the street
We’d like to thank our sponsors for their continuous support:
  • UQÀM
  • Bénélux
  • w.illi.am/
  • Outbox
  • Savoir-Faire Linux
  • Caravan
  • iWeb
Categories: External Blogs

Non-Linux FOSS: Animation Made Easy

Linux Journal - Wed, 01/14/2015 - 16:56

If you've ever wanted to make an animated film, the learning curve for such software often is really steep. Thankfully, the Pencil program was released and although basic, it provided a fairly simple way to create animations on your computer (Windows, Mac or Linux) with open-source tools. Unfortunately, the Pencil program was abandoned. more>>

Categories: Linux News

Internet of Things Blows Away CES, and it May Be Hunting for YOU Next

Linux Journal - Mon, 01/12/2015 - 16:44

Originally this article’s purpose was to discuss all the exciting happenings surrounding the 2015 International CES “Internet of Things” Showcase in Las Vegas, Nevada. After all, of the 3600+ exhibitors, there were fully 900 exhibitors with IoT designation at this most-amazing-of-all trade shows, and 170,000 people came through the turnstiles to see the spectacle! more>>

Categories: Linux News

Slow System? iotop Is Your Friend

Linux Journal - Mon, 01/12/2015 - 16:17

Back in 2010, Kyle Rankin did an incredible series on Linux Troubleshooting. In Part 1, he talked about troubleshooting a system struggling with a high load. more>>

Categories: Linux News
Syndicate content