Categories
blogging code diy slackware

Check Slackware Changelog using conky

Yesterday I was wondering what’s the best way to update Slackware, and I decided to keep a local mirror of the current branch on my nas, I can mount the directory using the NFS protocol when I need it and the nas can go check for updates and fetch them during the night while I sleep and the network is idle.

The real problem is that I used to rely on Conky to check for updates to the current tree by issuing a slackpkg check-updates, but having slackpkg use my local mirror, it will always say that there are no updates, because the mirror is always updated. So I decided to bypass the mirror for the sole purpose of checking the changelog, and I came up with this script:

#!/bin/bash
 CL="https://sunsite.icm.edu.pl/pub/Linux/slackware/slackware64-current/ChangeLog.txt"
 LOCAL_CL="/var/lib/slackpkg/ChangeLog.txt"
 TMP="/tmp"
 TMPCL="${TMP}/ChangeLog.txt"
 if [[ -f ${TMPCL} ]]; then
     rm $TMPCL
 fi
     wget -q -P ${TMP} ${CL}
     if [ "$?" != 0 ]; then
         echo "Error checking updates…Wait until next try."
     fi
 NCL=$(head -n 1 ${TMPCL})
 LCL=$(head -n 1 ${LOCAL_CL})
 if [[ ${NCL} != ${LCL} ]];then
     echo "Updated packages available!"
 else
     echo "No news is good news!"
 fi

Now I just download the Changelog.txt file from a trusted mirror, using head I check for changes in the first line between the latest file stored by slackpkg and the one I downloaded and if I find a difference I output a line to conky.

This script is made to be run by Conky and usually I have it run once every 12 hours if my pc is on for that long.
I hope someone find it useful 😉

See you on the next one.

Categories
diy linux

new home server ideas

I’m thinking about building a new home server, so I picked some parts I think might work well for what I need to do. Here’s the list for future reference:

PCPartPicker Part List: https://it.pcpartpicker.com/list/Kj3MZf

  • CPU: AMD Ryzen 3 3200G 3.6 GHz Quad-Core Processor
  • CPU Cooler: Cooler Master MasterLiquid ML240L RGB 66.7 CFM Liquid CPU Cooler
  • Thermal Compound: Thermal Grizzly Kryonaut 1g 1 g Thermal Paste
  • Motherboard: Gigabyte B450 AORUS M Micro ATX AM4 Motherboard
  • Memory: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3200 Memory
  • Case: Antec VSK10 MicroATX Mid Tower Case
  • Power Supply: EVGA BT 450 W 80+ Bronze Certified ATX Power Supply
  • Case Fan: 2x be quiet! Pure Wings 2 140 PWM 61.2 CFM 140 mm Fan

Total around €445.00 on amazon as suggested by PCPartPicker.

What do you guys think?

Categories
blogging diy

Calendario rifiuti Vigasio (VR)

Mi sono trasferito ad inizio Agosto a Vigasio (VR) e ho creato un calendario pubblico su google calendar per il conferimento dei rifiuti. Ogni comune dovrebbe averne uno.

Questo è il link per il calendario: Conferimento Rifiuti Vigasio (VR).
Questo è il link per scaricare il calendario in formato iCal.

Ho inserito le date dei rifiuti solo a partire dal 1 Agosto fino a fine anno, quindi non ci sono le date passate in quanto inutili.

Spero che possa tornare utile a qualcuno, io ho impostato i promemoria il giorno prima alle ore 20.00, in questo modo spero di ricordare di portare giù la spazzatura.

Have a good life.

Categories
diy linux slackware

baking programs

Compiling programs always feels like you’re baking a cake, you look for it, check the dependancies and then run the slackbuild, leave your computer to go grab a drink and when you come back you see an error, checking for it you notice you’ve forgotten a dependency, it’s like you put your cake in the oven, starts cooking and after a while you go “oh shit, I forgot to add sugar to the dough“.

I’ve been compiling a couple programs in the past few days and I’ve ended up patching them a lot, to compile audacity I had to go around and add 6 patches before the script managed to compile correctly, and today with qpdfview it was the same, still dependancy errors but in the end I made it work and let me tell you, when you come back to your PC and the script has ended and it says the program is installed it’s almost like you could smell it, your freshly baked cake waiting for you to enjoy it…

Categories
network

enabling cast to chromecast in latest chromium builds

I’ve tried for some time to get casting to work after Google stopped the cast extension because it is now builtin inside chrome/chromium, so I looked around and found out how to enable casting to chromecast devices from inside chromium browser. To do so, simply paste this line in a browser tab:

chrome://flags/#load-media-router-component-extension

In my case the media router component was set to “default”, so I disabled the media router component, after doing so chromium will ask you to relaunch the browser, after it has loaded again enable the component again and relaunch the browser one more time. Now try casting and it should work, simple as that!!

Categories
life speranza

Nessuno lascia la propria casa…

Spesso sento parlare in questi giorni degli immigrati che arrivano nel nostro paese, e questo poema mi torna in mente con prepotenza.

“No one leaves home unless
home is the mouth of a shark
you only run for the border
when you see the whole city running as well

your neighbours running faster than you
breath bloody in their throats
the boy you went to school with
who kissed you dizzy behind the old tin factory
is holding a gun bigger than his body
you only leave home
when home won’t let you stay.

no one leaves home unless home chases you
fire under feet
hot blood in your belly
it’s not something you ever thought of doing
until the blade burnt threats into
your neck
and even then you carried the anthem under
your breath
only tearing up your passport in an airport toilets
sobbing as each mouthful of paper
made it clear that you wouldn’t be going back.

you have to understand,
that no one puts their children in a boat
unless the water is safer than the land
no one burns their palms
under trains
beneath carriages
no one spends days and nights in the stomach of a truck
feeding on newspaper unless the miles travelled
means something more than journey.
no one crawls under fences
no one wants to be beaten
pitied

no one chooses refugee camps
or strip searches where your
body is left aching
or prison,
because prison is safer
than a city of fire
and one prison guard
in the night
is better than a truckload
of men who look like your father
no one could take it
no one could stomach it
no one skin would be tough enough

the
go home blacks
refugees
dirty immigrants
asylum seekers
sucking our country dry
niggers with their hands out
they smell strange
savage
messed up their country and now they want
to mess ours up
how do the words
the dirty looks
roll off your backs
maybe because the blow is softer
than a limb torn off

or the words are more tender
than fourteen men between
your legs
or the insults are easier
to swallow
than rubble
than bone
than your child body
in pieces.
i want to go home,
but home is the mouth of a shark
home is the barrel of the gun
and no one would leave home
unless home chased you to the shore
unless home told you
to quicken your legs
leave your clothes behind
crawl through the desert
wade through the oceans
drown
save
be hunger
beg
forget pride
your survival is more important

no one leaves home until home is a sweaty voice in your ear
saying:
leave,
run away from me now
I dont know what I’ve become
but i know that anywhere
is safer than here.”

In italiano recita più o meno così

“Nessuno lascia la propria casa a meno che
la propria casa non siano le fauci di uno squalo
corri verso il confine solo
se vedi la città correre con te

I tuoi vicini che corrono più veloce di te
respiro di sangue nelle loro gole
il ragazzo con cui andavi a scuola
che ti ha baciata dietro la vecchia fabbrica di latta
che regge un fucile più grande di lui
lasci la tua casa solo se
casa non ti permette più di rimanere.

Nessuno lascia la propria casa a meno che casa non ti insegua
fuoco sotto i piedi
sangue caldo nella pancia
non è qualcosa che hai mai pensato di fare
finchè la lama non ti ha minacciato
alla gola
e anche in quel momento continui a cantare l’inno
sottovoce
solo strappare il passaporto nei bagni dell’aeroporto
piangendo mentre ingoi ogni pezzo di carta
ti fa capire che non tornerai.

Dovete capire che
nessuno mette i propri figli su una barca
a meno che l’acqua non sia più sicura della terraferma
nessuno si brucia i palmi delle mani
sotto ai treni
sotto ai vagoni
nessuno spende giorni e notti nella pancia di un camion
mangiando giornali finchè le miglia trascorse
significano più che un viaggio.
Nessuno striscia sotto le recinzioni
nessuno vuole essere picchiato
compatito.

Nessuno sceglie i campi per i rifugiati
o le perquisizioni che ti lasciano
il corpo dolorante
o la prigione,
perchè la prigione è più sicura
di una città in fiamme
e una guardia nella notte
è meglio di un camion pieno
di uomini che somigliano a tuo padre
nessuno potrebbe reggerlo
nessuno potrebbe accettarlo
non c’è pelle abbastanza dura

Tutti quei
a casa negri
rifugiati
sporchi immigranti
in cerca di asilo
che ci prosciugano la nostra nazione
negri con le mani in avanti
con uno strano odore
selvaggi
hanno distrutto la loro nazione e adesso
vogliono distruggere la nostra
come possono le parole
gli sguardi cattivi
scivolarti addosso
forse perchè fanno meno male
che essere eviscerati

o le parole sono molto più dolci
di quattordici uomini
tra le tue gambe
o gli insulti sono più facili da ingoiare
delle macerie
delle ossa
del corpo di tuo figlio
a pezzi.
Voglio andare a casa,
ma casa è le fauci di uno squalo
casa è la canna di un fucile
e nessuno lascerebbe la propria casa
a meno che casa non ti insegua fino alla spiaggia
a meno che casa non ti dica
di correre veloce
lasciare indietro i tuoi vestiti
strisciare nel deserto
attraversare gli oceani
annegare
salvarti
avere fame
implorare
dimenticare il tuo orgoglio
la tua sopravvivenza è più importante

nessuno lascia la propria casa a meno che
casa non sia una voce ansimante nel tuo orecchio
che dice:
vai via,
scappa da me adesso
non so cosa io sia diventata
ma so che ovunque è più sicuro che qui.”

Questo poema che mi sono permesso di tradurre, si chiama home ed è stato scritto da Warsan Shire, scrittrice britannica nata da genitori Somali in Kenia. E’ un forte ritratto di uno dei temi più caldi dei nostri giorni e non può non far riflettere su quella che è la condizione dei rifugiati che scappano dai teatri di guerra.

Categories
code diy WordPress

new plugin – WordPress.org stats for plugin developers

dnxwporg banner
danixland wporg stats plugin

I’m back at writing plugins, this time I wanted a simple way of displaying all the plugins I developed on my website, so I decided to dive in the WordPress.org API documentation to understand how could I do to get a list of all the plugins I have, hosted on the Plugins directory for WordPress.

Categories
code diy linux

GIT – how to setup your own server

Hello everyone,

I recently decided to move all my code under GIT, I’ve used it before and I’ve used also SVN, but I find GIT to be more straightforward in some aspects.

In order to use git I needed a place online where to store my projects, and I thought that github could be a good place, but the fact that you have to pay to keep a project private just didn’t sound right in my opinion. Of course github is there to make money (specially now that M$ bought it), but I prefer to have a simpler setup and be able to do things my way as much as possible.

So I started planning what I wanted my git server to have. Here’s a list:

  • Security – I decided to make it work only under ssh, that way only someone who has the key can clone or access the repository. I also added an unprivileged git user that has only access to very few commands, so even if somebody manages to access through ssh he’ll find himrself with only very few options available.
  • Notifications – my server already tells me a lot of what happens, so I wanted my git service to do the same. I implemented a mail service that notifies me every time a new repository is added or everytime there’s a push to a repository.
  • Automation – I wanted to have less steps possible between creation of the project and deployment to production. Now in two steps I can create a repository and clone it to my local computer, and when I’m done I just need to push my modifications and the code is deployed automatically.
  • Visibility – I haven’t yet decided if I want my code to be visible, so I haven’t even started thinking about this possibility.
Categories
security

Vulnerabilities for PGP and emails

following a series of tweets from the Electronic Frontier Foundation, I’m reblogging their article to give it even more visibility on a topic that many don’t seem to know, which is email encryption.

A group of researchers has found out and published a series of vulnerabilities affecting the use of PGP for email encryption (you can read more in depth coverage on this topic on the EFF website)

From what I understand the problem is related to those plugins that rely on PGP or GnuPG to automatically decrypt emails. This vulnerability could allow an attacker to read not only an encrypted message but even older messages encrypted with the same key.

while the various vendors are fixing their software EFF recommendation right now is to disable all plugins that allow to decrypt emails automatically and not to decrypt messages inside the mail software but instead, export them and decrypt them offline.

Here you can find a list of good procedures to disable the affected plugins and how to export encrypted emails to be read using offline tools: Pretty Good Procedures for Protecting Your Email

 

Categories
diy linux

lock screen with xscreensaver

Just a quick tip in case you’re not using a major desktop environment like KDE. I’m using LXQT at the moment and as a screensaver it uses xscreensaver. It has no default shortcut to lock the screen, so I looked around a little bit and I found this command:

xscreensaver-command -lock

which will fire up the screensaver locking the screen.

to set it up just open the lxqt settings and add a new global shortcut (mine is Win + L) and save. That’s it, now everytime you need to lock your screen just hit the shortcut and voilà..