Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Caolán McNamara: GTK4: Toolbar popups via GtkPopovers

    Bootstrapped using GtkPopovers to implement popups from LibreOffice's main menubars for GTK4.

  • You should use ReadonlyArray in your React state | Tiger Oakes

    If you’ve ever written any React code, you’ve probably used arrays to represent state: an array of todo items, articles fetched from the server, and more. But sometimes React doesn’t update after you change that state. Usually, that’s because you mutated an array instead of copying it - a mistake easily prevented by using read-only types like ReadonlyArray. Here’s why you should start switching to read-only!

  • React Studio: A Real-time RAD Editor and Prototyping tool for React Developers and Designers

    React Studio is a free IDE and RAD tool for designers and developers that allows them in designing, prototyping, and building production-ready React apps.

    The app is currently available for macOS 10.12 and later, it supports dynamic data, and comes with a rich and advanced visual layout editor.

    React Studio supports progressive web apps (PWA) out-of-the-box, which work seamlessly on mobile platforms such as iOS, Android, as well as Chromebooks.

  • A toy remote login server

    Hello! The other day we talked about what happened when you press a key in your terminal.

    As a followup, I thought it might be fun to implement a program that’s like a tiny ssh server, but without the security. You can find it on github here, and I’ll explain how it works in this blog post.

    the goal: “ssh” to a remote computer

    Our goal is to be able to login to a remote computer and run commands, like you do with SSH or telnet.

    The biggest difference between this program and SSH is that there’s literally no security (not even a password) – anyone who can make a TCP connection to the server can get a shell and run commands.

    Obviously this is not a useful program in real life, but our goal is to learn a little more about how terminals works, not to write a useful program.

    (I will run a version of it on the public internet for the next week though, you can see how to connect to it at the end of this blog post)

  • Android Shared Storage Qt Wrapper - KDAB

    In this article, I’d like to talk about Android storage.

    In recent Android versions, Google decided, for a good reason, to restrict the access to the SD card. This means, even if your application will have the old READ/WRITE_EXTERNAL_STORAGE permissions declared and granted, you won’t be able to freely access the SD Card contents like you used to.

    In order to access the SD card or any other shared storage places, you’ll have to use the Android shared storage API. The good news is that, with this API, you’ll be able to access any file from any storage location (i.e. from gdrive), without any special code.

  • Hackster's FPGAdventures: Experimenting with Microchip's PolarFire SoC Icicle Kit Linux Code Samples - Hackster.io

    In our last look at Microchip's flexible PolarFire SoC Icicle Kit, which blends low-power high-performance field-programmable gate array (FPGA) technology with Linux-capable processing cores built around the free and open source RISC-V instruction set architecture (ISA), we built our own Linux distribution using the Yocto board support package (BSP) and ran a selection of workloads to put the system through its paces.

    The Icicle Kit isn't designed as a single-board computer you just pick up and use to run pre-built binaries, though: it's a development tool first and foremost, and whether you're a professional or a hobbyist you're going to want to get your hands dirty coding in order to make the most of the board's capabilities.

  • Going to Akademy! | espidev

    I am going to be attending Akademy 2022 in person!

    This is my first time going to Akademy in-person, so it is quite exciting! I will be doing a talk with Bhushan on the state of Plasma Mobile.

    [...]

    Through 2020, I worked on many Plasma Mobile applications such as KWeather, and also started poking around contributing to the shell. I also did some work for the desktop, including some work on adding fingerprint support to the users kcm.

  • Nibble Stew: That time when I accidentally social engineered myself to a film set

    I spent the last week in Toronto in the Cpp North conference. It was so much fun just to hang around with people after such a long pause.My talk was about porting large code bases from one build system to another, using LibreOffice as an example The talk should eventually show up on Youtube but there is no precise schedule for that yet.

    After the conference ended I had a few spare days to do touristy stuff which was also fun. On the last day when I was packing my stuff I noticed that there was a film crew just outside the conference hotel clearly shooting something. The area did not seem to be closed off so obviously I went in to take a closer look. It was past 9 pm and I only had my phone camera so all the pictures below are a bit murky. On the other hand you can clearly see just how much lighting power you need to shoot high quality video material.

    [...]

    I stood next to one of the pillars shown in the middle of the picture next to a thing that looked suspiciously like a director's chair. I just leaned against the wall perfectly still while remaining calm and passive and nobody paid any attention to me at all. I could observe the crew going about their business, browse their monitors (which, sadly, did not show anything interesting) and even see their uncannily realistic looking baby prop up close. I was probably there for around 30 minutes or so until someone finally asked me if I was part of the crew and then kindly asked me to leave which I did.

  • Common GLib Programming Errors – Michael Catanzaro's Blog

    Let’s examine four mistakes to avoid when writing programs that use GLib, or, alternatively, four mistakes to look for when reviewing code that uses GLib. Experienced GNOME developers will find the first three mistakes pretty simple and basic, but nevertheless they still cause too many crashes. The fourth mistake is more complicated.

    These examples will use C, but the mistakes can happen in any language. In unsafe languages like C, C++, and Vala, these mistakes usually result in security issues, specifically use-after-free vulnerabilities.

  • This Week In Rust: This Week in Rust 453

More in Tux Machines

today's howtos

  • How to Change Comment Color in Vim – Fix Unreadable Blue Color

    Are you annoyed about the comment color in vim? The dark blue color of the comment is often hard to read. In this tutorial, we learn how to change the comment color in Vim. There are few methods we can use to look vim comment very readable.

  • How to Add Repository to Debian

    APT checks the health of all the packages, and dependencies of the package before installing it. APT fetches packages from one or more repositories. A repository (package source) is basically a network server. The term "package" refers to an individual file with a .deb extension that contains either all or part of an application. The normal installation comes with default repositories configured, but these contain only a few packages out of an ocean of free software available. In this tutorial, we learn how to add the package repository to Debian.

  • Making a Video of a Single Window

    I recently wanted to send someone a video of a program doing some interesting things in a single X11 window. Recording the whole desktop is easy (some readers may remember my post on Aeschylus which does just that) but it will include irrelevant (and possibly unwanted) parts of the screen, leading to unnecessarily large files. I couldn't immediately find a tool which did what I wanted on OpenBSD [1] but through a combination of xwininfo, FFmpeg, and hk I was able to put together exactly what I needed in short order. Even better, I was able to easily post-process the video to shrink its file size, speed it up, and contort it to the dimension requirements of various platforms. Here's a video straight out of the little script I put together: [...]

  • Things You Can And Can’t Do

    And it got me thinking about what you can and can’t do — what you do and don’t have control over.

  • allow-new-zones in BIND 9.16 on CentOS 8 Stream under SELinux

    We run these training systems with SELinux enabled (I wouldn’t, but my colleague likes it :-), and that’s the reason I aborted the lab: I couldn’t tell students how to solve the cause other than by disabling SELinux entirely, but there wasn’t enough time for that.

  • Will the IndieWeb Ever Become Mainstream?

    This is an interesting question, thanks for asking it, Jeremy. I do have some history with the IndieWeb, and some opinions, so let’s dive in.

    The short answer to the question is a resounding no, and it all boils down to the fact that the IndieWeb is really complicated to implement, so it will only ever appeal to developers.

  • How to Install CUPS Print Server on Ubuntu 22.04

    If your business has multiple personal computers in the network which need to print, then we need a device called a print server. Print server act intermediate between PC and printers which accept print jobs from PC and send them to respective printers. CUPS is the primary mechanism in the Unix-like operating system for printing and print services. It can allow a computer to act as a Print server. In this tutorial, we learn how to set up CUPS print server on Ubuntu 22.04.

Open Hardware: XON/XOFF and Raspberry Pi Pico

  • From XON/XOFF to Forward Incremental Search

    In the olden days of computing, software flow control with control codes XON and XOFF was a necessary feature that dumb terminals needed to support. When a terminal received more data than it could display, there needed to be a way for the terminal to tell the remote host to pause sending more data. The control code 19 was chosen for this. The control code 17 was chosen to tell the remote host to resume transmission of data.

  • Raspberry Pi Pico Used in Plug and Play System Monitor | Tom's Hardware

    Dmytro Panin is at it again, creating a teeny system monitor for his MacBook from scratch with help from our favorite microcontroller, the Raspberry Pi Pico. This plug-and-play system monitor (opens in new tab) lets him keep a close eye on resource usage without having to close any windows or launch any third-party programs. The device is Pico-powered and plugs right into the MacBook to function. It has a display screen that showcases a custom GUI featuring four bar graphs that update in real-time to show the performance of different components, including the CPU, GPU, memory, and SSD usage. It makes it possible to see how hard your PC is running at a glance.

Security Leftovers

How to Apply Accent Colour in Ubuntu Desktop

A step-by-step tutorial on how to apply accent colour in Ubuntu desktop (GNOME) with tips for Kubuntu and others. Read more