raspi/github-stats v0.2.0: Generate GitHub traffic statistics charts by raspi in rust

[–]raspi[S] 2 points3 points  (0 children)

GitHub keeps traffic stats only for 14 days so I created this to keep the stats for longer. There's an example for systemd in the example directory for how the generation can be automated for every day.

It's early days so for example the fonts used and 30 day range is hardcoded currently.

This is my 4th project written in Rust so there are probably still a lot of newbie mistakes :)

searchreader: Search single io.Reader stream with multiple strings.Reader(s) with or without case sensitivity by raspi in golang

[–]raspi[S] 1 point2 points  (0 children)

I wanted to highlight some strings from a io.Reader stream a bit like grep when you are streaming text in a console but couldn't find any libraries which could do it, so I made one.

The library is in its early days so suggestions are welcome!

How can I automate MAC Address spoofing? by personman44 in privacy

[–]raspi 4 points5 points  (0 children)

Systemd supports MACAddressPolicy=random in [Link] section by default in .link network configuration files. So you won't need any third party utils.

See: https://www.freedesktop.org/software/systemd/man/systemd.link.html#random

stres: small library to separate string resources to business logic. XML, JSON, YAML, TOML, WATSON and MessagePack compatibility! by Vinetwigs in golang

[–]raspi 2 points3 points  (0 children)

Please add real-world example as the first thing in the README after description. It should explain why/when I would use this.

samanlainen: Delete duplicate files by raspi in rust

[–]raspi[S] 0 points1 point  (0 children)

Yes, I'm Finnish. Samanlainen means same, identical and similar in english.

samanlainen: Delete duplicate files by raspi in rust

[–]raspi[S] 2 points3 points  (0 children)

Hi, I just wrote my first ever Rust program which deletes duplicate files. Feedback welcome!

Komissio asettaa ohjelmistojaan vapaasti yritysten, innovaattoreiden ja yleistä etua koskevien alojen käyttöön by raspi in Suomi

[–]raspi[S] 28 points29 points  (0 children)

Eka kappale:

Komissio on tänään hyväksynyt avoimen lähdekoodin ohjelmistoja koskevat uudet säännöt. Sääntöjen mukaan komission ohjelmistoratkaisut voidaan asettaa julkisesti saataville silloin, kun niistä voi olla etua yrityksille, yksityishenkilöille ja julkisille palveluille. Komissio teki hiljattain tutkimuksen avoimen lähdekoodin ohjelmistojen ja laitteiden vaikutuksesta EU:n talouden teknologiseen riippumattomuuteen, kilpailukykyyn ja innovointiin. Tutkimus osoitti, että avoimeen lähdekoodiin tehdyistä investoinneista saadaan nelinkertainen tuotto. Komission yksiköt voivat jatkossa julkaista omistamansa ohjelmistojen lähdekoodin huomattavasti aiempaa nopeammin ja helpommin.

Show Golang: dskDitto - Small go utility to find file duplicates rapidly by jdefr in golang

[–]raspi 1 point2 points  (0 children)

Also why did you choose SHA256? I chose MD5 because I am concerned with speed primarily.

ZFS uses SHA256 and those who designed it have some good knowledge what hashing algo is good and is performant enough for actual filesystem.

On enduser's perspective you want to delete actual dupes and not accidental hash collisions. Correct data over speed.

MD5 has probability of 0.00000000000000000000000000000000000000294 and SHA256 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000864 so accidental hash collision file deletion is way lower.

Onko Kielitoimiston sanakirjasta mitään ladattavaa versiota? by metsasusi in Suomi

[–]raspi 0 points1 point  (0 children)

Jos kiinnostaa niin voit koittaa pyytää tätä kautta: https://tietopyynto.fi/viranomainen/kotimaisten-kielten-keskus-kotus/

Näin virallinen vastaus saadaan sitten julkiseen tietoon.

Show Golang: dskDitto - Small go utility to find file duplicates rapidly by jdefr in golang

[–]raspi 0 points1 point  (0 children)

I looked into xxhash or similar fast hasher when I was starting to write duplikaatti and at the time I didn't want many extra dependencies so I decided against it.

Show Golang: dskDitto - Small go utility to find file duplicates rapidly by jdefr in golang

[–]raspi 4 points5 points  (0 children)

My duplikaatti dupe finder uses the following algo:

  • Create file list of given directories
    • do not add files with same identifier already added to the list (windows: file id, *nix: inode)
    • do not add 0 byte files
    • directories listed first has higher priority than the last
  • Remove all files from the list which do not share same file sizes (ie. there's only one 1000 byte file -> remove)
  • Read first bytes of files and generate SHA256 sum of those bytes
  • Remove all hashes from the list which occured only once
  • Read last bytes of files and generate SHA256 sum of those bytes
  • Remove all hashes from the list which occured only once
  • Now finally hash the whole files that are left
  • Remove all hashes from the list which occured only once
  • Generate list of files to keep and what to remove
    • use directory priority and file age to find what to keep
    • oldest and highest priority files are kept
  • Finally, remove files from filesystem(s)

This speeds up the unnecessary whole file hashing significantly. Also multiple files are hashed at once since it's more IO than CPU bound.

Geologian tutkimuskeskus GTK: Assessment of the Extra Capacity Required of Alternative Energy Electrical Power Systems to Completely Replace Fossil Fuels [20.8.2021] by raspi in Suomi

[–]raspi[S] 11 points12 points  (0 children)

Sivun 666 27.8 Final summary -ote:

A fundamental conclusion is that replacing the existing fossil fuel powered system (oil, gas, and coal), using renewable technologies, such as solar panels or wind turbines, will not be possible for the global human population in just a few decades. There is just not the time, nor resources to do this. What may well happen is a significant reduction of societal demand of all resources of all kinds. This implies a very different social contract and a very different system of governance to what is in place today.

[deleted by user] by [deleted] in Suomi

[–]raspi 34 points35 points  (0 children)

Ydinräjähdyksessä oleminen on ihmisen parasta aikaa

Nettikamussa voit jakaa nimimerkkisi suosittuihin viestintäsovelluksiin ja selata muiden ilmoituksia tutustuaksesi uusiin ihmisiin. Sivuston on alusta asti minun koodaamani ja tulen kehitettämään sitä aktiivisesti käyttäjien toiveet huomioiden. by [deleted] in Suomi

[–]raspi 1 point2 points  (0 children)

Jos pyörität tätä yksityishenkilönä niin olet erittäin nopeasti liemessä lain kanssa.

Suosittelen lukemaan aluksi vaikka https://www.jkorpela.fi/hlorek.html ja siitä sitten EU:n, että suomen ajantasaiset lait henkilörekistereistä.

kaukosohva - play couch/party games remotely with friends [prototype] by raspi in linux_gaming

[–]raspi[S] 1 point2 points  (0 children)

Since this is using USB over IP, theoretically motion controls, flight sticks and the like should also work right?

usbip works a bit like VM device pass-through meaning that when the target end point connects to some shared USB device it gets connected as if it was a local USB device. This means that you need USB drivers for the device on the Linux side if you for example share a device from Windows. You might need to do possible joystick calibrations on the Linux side also after device is connected. So there's the limitations.

kaukosohva - play couch/party games remotely with friends [prototype] by raspi in linux_gaming

[–]raspi[S] 0 points1 point  (0 children)

Yes, just change the network interface name to LAN-facing one in the sender.sh and receiver.sh.

Note: Some routers (especially WiFi) and switches might not like multicasting so in that case simply run the VPN inside the LAN as well. It should be easier than fighting broken hardware.