Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Remi Collet: PHP version 7.2.27, 7.3.14 and 7.4.2

    RPMs of PHP version 7.4.2 are available in remi-php74 repository for Fedora ≥ 29 and Enterprise Linux ≥ 7 (RHEL, CentOS).

    RPMs of PHP version 7.3.14 are available in remi repository for Fedora 30-31 and remi-php73 repository for Fedora 29 and Enterprise Linux ≥ 6 (RHEL, CentOS).

    RPMs of PHP version 7.2.27 are available in remi repository for Fedora 29 and remi-php72 repository for Enterprise Linux ≥ 6 (RHEL, CentOS).

  • Remi Collet: PHP version 7.2 required

    So, now, some noarch packages in the remi repository require 7.2 as the minimal required version.

    foo requires php(language) >= 7.2
    Despite the remi repository still provides the PHP 5.6, 7.0 and 7.1, and even if I still plan to maintain these versions for some time (backporting some security patches, when some other repositories just planned to drop them), this doesn't suite the main goal of my repository: provide the latest versions of PHP and promote their adoption by developers and users.

  • Smalltalk-Inspired Pharo 8.0 Released

    Pharo is based on thus general concepts of Smalltalk. Thuss it is strongly object-oriented and everything in the Pharo language is an object. The language is dynamically typed; inheritance is simple; memory management is automatic via a garbage collector and its syntax is very simple and small.

    There's an enthusiastic collection of developers using Pharo, and the developers make regular commits and provide almost daily bug fixes. The language has a number of ways to interface with C, and there are Java and JavaScript libraries.

    The first change of note in Pharo 8 is the move to 64-bit as the recommended version for Windows - it already was the main version for Unix and OSX. Iceberg, the git client for Pharo, has also been improved in this release, with better management of projects and repositories management, improved merging, and faster loading and comparison for projects with big packages.

  • HackSpace’s 25 ways to use a Raspberry Pi

    The latest issue of HackSpace magazine is out today, and it features a rather recognisable piece of tech on the front cover.

  • Delete Files with Java 8

    A friend asked me to help him with the following in Bash -- delete all files but a whitelisted and use mix / max depth for directory traversal. It's probably possible in Bash with some crazy find, grep, etc one-liner.

  • Asynchronous Tasks in Ansible

    Most users know Ansible well for its ability to perform configuration management as well as orchestrate complex software deployment. However, Ansible also has a reasonable arsenal of features that lend themselves to operational tasks. There are modules that can handle simple tasks such as creating user accounts and restarting daemons. But more than just modules, some core features of Ansible make it a great tool for any systems administrator.

    [...]

    You might think that Ansible will eventually timeout on long-running jobs. You would be correct in the default case. However, with a little configuration, you can still have Ansible take care of these tasks for you! Ansible offers the ability to asynchronously execute tasks. You have the option of configuring Ansible check back on a regular interval or you can even have Ansible “fire and forget” if you so choose. This can help you get around pesky ssh timeouts among other things!

    What is especially great about the asynchronous task feature is that it is really easy to use! There are only two flags affiliated with the feature. The -B flag is used to set our task timeout value. We pass a number of seconds with the flag.

  • 'Thousands Of Tools Have Come & Gone, But Ansible & Bash Have Stood The Test Of Time'
  • Container debugging minihint

    What’s in my container?

  • Bdale Garbee: Digital Photo Creation Dates

    I thought briefly about hacking Piwigo to use the GPS time stamps, but quickly realized that wouldn't actually solve the problem, since they're in UTC and the pictures from our phone cameras were all using local time. There's probably a solution lurking there somewhere, but just fixing up the times in the photo files that were wrong seemed like an easier path forward.

    A Google search or two later, and I found jhead, which fortunately was already packaged for Debian. It makes changing Exif timestamps of an on-disk Jpeg image file really easy. Highly recommended!

    Compounding my problem was that my wife had already spent many hours tagging her photos in the Piwigo web GUI, so it really seemed necessary to fix the images "in place" on the Piwigo server. The first problem with that is that as you upload photos to the server, they are assigned unique filenames on disk based on the upload date and time plus a random hash, and the original filename becomes just an element of metadata in the Piwigo database. Piwigo scans the Exif data at image import time and stuffs the database with a number of useful values from there, including the image creation time that is fundamental to aligning images taken by different cameras on a timeline.

    [...]

    At this point, all the files on disk were updated, as a little quick checking with exif and exiv2 at the command line confirmed. But my second problem was figuring out how to get Piwigo to notice and incorporate the changes. That turned out to be easier than I thought! Using the admin interface to go into the photos batch manager, I was able to select all the photos in the folder we upload raw pictures from Karen's camera to that were taken in the relevant date range (which I expressed as taken:2019-12-14..2021), then selected all photos in the resulting set, and performed action "synchronize metadata". All the selected image files were rescanned, the database got updated...

More in Tux Machines

today's howtos

Programming: Golang, Perl, Python and the GCC Story

  • 9 Reasons You Should Use Golang Language

    Golang is the open-source programming language developed by Google in the year 2007. Several programming languages are present in the market with advantages and disadvantages. We cannot predict which language is better, it would take months to discuss. However, the most sensible thing that helps choose a better language is the one that suits a specific purpose more reliably than the others. Thus, Golang development will be most suitable for those who are willing to combine simplicity, concurrency, and safety of the code. Different programming languages are less memory efficient and are unable to communicate with the hardware. Therefore, Golang is one of the most preferred languages for developers that help build software. It is also the open-source and procedural language that is advantageous to deploy simple, effective, and reliable software. Go language aids the environment to adopt different patterns that are similar to dynamic languages. Go language has several advantages that are responsible to quicken the development process. Moreover, Golang is the language that makes the process of software development easy and simple for programmers. These days, Golang is gaining popularity amongst the developers as it has a plethora of advantages than the other programming languages. So, the use of Golang has been adopted by mobile app development companies.

  • Demonstrating PERL with Tic-Tac-Toe, Part 1

    PERL is a procedural programming language. A program written in PERL consists of a series of commands that are executed sequentially. With few exceptions, most commands alter the state of the computer’s memory in some way. Line 00 in the Tic-Tac-Toe program isn’t technically part of the PERL program and it can be omitted. It is called a shebang (the letter e is pronounced soft as it is in the word shell). The purpose of the shebang line is to tell the operating system what interpreter the remaining text should be processed with if one isn’t specified on the command line. Line 02 isn’t strictly necessary for this program either. It makes available an advanced command named state. The state command creates a variable that can retain its value after it has gone out of scope. I’m using it here as a way to avoid declaring a global variable. It is considered good practice in computer programming to avoid using global variables where possible because they allow for action at a distance. If you didn’t follow all of that, don’t worry about it. It’s not important at this point.

  • Perl Weekly Challenge 048: Survivor and Palindrome Dates

    I tried two different approaches to the problem. The first one uses an array of living people and a variable $sword that stores the index of the person holding the sword. In each iteration of the loop, the next person is removed from the array, and the sword is passed to the next person. The “next person” has a special cyclic meaning: at the end of the array, the sword must return to the beginning. This is achieved by using the modulo operator %. Note that we use it twice, once to find the person to kill, and once to find the person to pass the sword to—and each case uses a different array size in the modulo operation, as killing a person changes the size of the array.

  • My Unexpected Dive into Open-Source Python

    I'm very happy to announce that I have joined Quansight as a front-end developer and designer! It was a happy coincidence how I joined- the intersection of my skills and the open source community's expanded vision. I met Ralf Gommers, the director of Quansight Labs, at the PyData Conference in New York City last year after giving a Lightning Talk. However, as cool and confident as this may sound, I sure didn't start off that way. At that point, it's been a few months since I graduated from a coding bootcamp. I was feeling down in the job-search funk. I hadn't even done much in Python, since my focus was in Javascript.

  • Reposurgeon defeats all monsters!

    On January 12th 2020, reposurgeon performed a successful conversion of its biggest repository ever – the entire history of the GNU Compiler Collection, 280K commits with a history stretching back through 1987. Not only were some parts CVS, the earliest portions predated CVS and had been stored in RCS. I waited this long to talk about it to give the dust time to settle on the conversion. But it’s been 5 weeks now and I’ve heard nary a peep from the GCC developers about any problems, so I think we can score this as reposurgeon’s biggest victory yet. The Go port really proved itself. Those 280K commits can be handled on the 128GB Great Beast with a load time of about two hours. I have to tell the Go garbage collector to be really aggressive – set GOGC=30 – but that’s exactly what GOGC is for.

Kdenlive: From Beginner to Advanced Video Editing

This is a different kind of video because it has a bit of Time Travel in it. In June 2019, I presented a talk at the SouthEast LinuxFest entitled “Kdenlive: From Beginner to Advanced Video Editing”. This was an interesting experience and the editing process took an excessive amount of time which I suppose is fitting for a video about video editing. In this video, you will learn some tips and tricks that I use for working in Kdenlive as well as some cool transitions like Matte Transitions. There was also a very useful Questions & Answers section at the end of the talk. I actually learned some more things during the process of editing this video so there is always plenty to learn about this kind of software. If you would like more Kdenlive videos from me then please leave a comment below. I would be happy to make some specific tutorial videos, this is more of an overview and I think there’s plenty to show in tutorial form. Read more

Videos/Audiocasts/Shows: GNU/Linux and Python, Fresh Look at LMDE 4 Beta

  • Hopeful for HAMR | TechSNAP 423

    We explore the potential of heat-assisted magnetic recording and get excited about a possibly persistent L2ARC. Plus Jim's journeys with Clear Linux, and why Ubuntu 18.04.4 is a maintenance release worth talking about.

  • 2020-02-21 | Linux Headlines

    Red Hat OpenStack Platform reaches version 16, Google announces the mentors for this year’s Summer of Code, DigitalOcean secures new funding, the Raspberry Pi 4’s USB-C power problems get a fix, and the GTK Project unveils its new website.

  • Talk Python to Me: #252 What scientific computing can learn from CS

    Did you come into Python from a computational science side of things? Were you just looking for something better than Excel or Matlab and got pulled in by all the Python has to offer?  That's great! But following that path often means some of the more formal practices from software development weren't part of the journey.  On this episode, you'll meet Martin Héroux, who does data science in the context of academic research. He's here to share his best practices and lessons for data scientists of all sorts.

  • Matt Layman: Templates and Logic - Building SaaS #45

    In this episode, we added content to a template and talked about the N+1 query bug. I also worked tricky logic involving date handling. The first change was to update a course page to include a new icon for any course task that should be graded. After adding this, we hit an N+1 query bug, which is a performance bug that happens when code queries a database in a loop. We talked about why this happens and how to fix it. After finishing that issue, we switched gears and worked on a tricky logic bug. I need a daily view to fetch data and factor in the relative time shift between the selected day and today. We wrote an involved test to simulate the right conditions and then fixed the code to handle the date shift properly.

  • LMDE 4 Beta Debbie Run Through

    In this video, we are looking at LMDE (Linux Mint Debian Edition) 4 Debbie.