senotrusov
Eventually, I wrote my own bidirectional sync tool that synchronizes a git checkout (for example, ~/.dotfiles) with the actual home directory. I run it as a systemd service, so I can simply edit or delete files in ~/.dotfiles, and everything else happens automatically.
I can add or remove files in the repository, and they will automatically be created or removed in their synchronized locations. At the same time, the target directories can contain other unrelated files, including an entire $HOME, and this does not interfere with synchronization in any way.
The bidirectional sync is particularly useful when a program, such as vs code, decides to modify its own configuration files, or when I'm feeling lazy and just want to edit ~/.bashrc directly and commit the changes later.
Achieving this requires some careful logic that, hopefully, I've managed to get right. At least at the time I wrote it, I hadn't seen these implemented in other systems.
Oh, and I use the same sync for some files I need to /etc, only for that I run sudo scripts and dont' have a always-on service for obvious reasons.
I'd be happy if someone else found it useful too: https://github.com/senotrusov/etcdotica
The free web hosting service Geocities.com was founded by “Beverly Hills Internet” in July 1995 — exactly the time when the web left academia and started to be made by everyone of us.
Soon it became one of the most popular and inhabited places of the WWW and stayed that way through the second part of 1990’s. In January 1999, on the peak of Dot.com mania, it was bought by Yahoo!.
The new millennium proved Geocities to be a bad investment. Having a page on there became a synonym for dilettantism and bad taste. Furthermore, the time of personal home pages was counted, being replaced with profiles on social networks.
Ten years later, in April 2009, Yahoo! announced that they are going to shut down the service.
On the 26th of October 2009 Geocities seized to exist. In between the announcement and the official date of death a group of people calling themselves Archive Team managed to rescue almost a terabyte of Geocities pages. On the 26th of October 2010, the first anniversary of this Digital Holocaust, the Archive Team started to seed geocities.archiveteam.torrent.
On the 1st of November 2010 Olia and Dragan bought a 2 TB disk and started downloading the biggest torrent of all times.
[...]
Being inpatient we started to unzip the first packages and dig into the treasures of Web 1.0. This blog is the first inventory of our findings.
Show HN: A tool to keep dotfiles and system configs in sync with a Git repo
https://github.com/senotrusov/etcdotica
Hi HN,I built a small tool called etcdotica in Golang for keeping dotfiles and small system configs in sync with a Git or other VCS repository that mirrors your machine's filesystem layout.I was not happy with many existing tools in that space.The idea is simple: your repo looks like your system. A file at home/.bashrc maps to ~/.bashrc, while root/etc/... maps under /etc. Running the tool...
Show HN: Arch Linux installation lab notes turned into a clean guide
https://www.senotrusov.com/notes/installing-arch-linux/
Hi HN,I turned my personal Arch Linux installation notes into a public guide and wanted to share it.It is a set of lab notes for a fully manual install, with the exact commands written down along with the reasoning behind each choice. It is, of course, not a replacement for the Arch Wiki.The guide is structured as a modular walkthrough, with clear paths for choices like ext4 vs Btrfs, optional...
Considering that access is limited to the countries on the list [0], I wonder what motivated their choices, especially since many Balkan countries were left out.
[0]: https://developers.google.com/gemini-code-assist/resources/a...
I built it because I work across multiple machines and often worry about which projects are on which computer or whether I’ve left any files in unique locations. Now I can diff the summaries between devices to see what’s out of sync, which repositories have uncommitted changes, and which folders have been modified.
I avoid using cloud sync services, and most of my files are already in git anyway. I find that having clear visibility is enough, I just need to know what to commit, push, pull, or sync manually.
I would be glad if it proves useful to someone besides me.
Back than I just read the redis docs, understands that BRPOPLPUSH is the right method to call, and made a few ruby functions to do so, you could see it here [1], they are plain and simple.
From my perspective, it's just feature starving OSS part, to push customers towards the paid solution.
[1]: https://github.com/senotrusov/redis-call/blob/master/lib/red...
I usually work in multiple Linux virtual machines and I have a Bash script to setup regular backup of all my many $HOMEs.
I did not yet have the script for verification (did it manually just to be sure), but the rest is here if someone is interested https://github.com/senotrusov/sopkafile/blob/main/lib/ubuntu...
It took me some time to figure it all out. I wrote a script to not manually repeat configuration steps next time. Although it's quite opinionated it still grew to 600 lines.
Feel free to check it out, maybe it can help someone https://github.com/senotrusov/backup-script
I use syncthing to synchronize files. It's fast, stable, cost me nothing and the only limit I have is the size of my disks.
Syncthing is decentralized, that means that two machines have to be powered on at the same time to be able to perform sync. Raspberry Pi allows me to have that always-on machine at home which is small, quiet and unnoticeable in my electricity bill. Syncthing works across internet bypassing NAT thanks to the community-ran relays (I also run one of them). I could take my laptop everywhere and file changes will still reach my Raspberry Pi.
I hook up an external Seagate USB HDD and it runs just fine without an extra power source. Syncthing keeps up-to-date copy of all my files on that external HDD.
I use borg-backup to take hourly snapshots of my files. Those snapshots are encrypted and I upload them offsite without any worries that some cloud provider could possibly read them. I use rclone for that, it can interface with a number of cloud providers out there. It just take your files and one-way sync them into the cloud.
The setup of rclone and borg-backup is not particularly complicated but still requires some time. Directories, encryption keys, periodic jobs have to be configured. I abstracted all that into one script which is a bit opinionated but works for me. That script can be run on Linux on on MacOS. I used my Mac for that before Raspberry Pi. It uses system or launchd to run periodic jobs https://github.com/senotrusov/backup-script
I installed Ubuntu server on that Raspberry Pi to have familiar environment.
Sadly Raspberry Pi lacks secure boot and have no internal TPM functionality. My external HDD is encrypted but I can't trust Raspberry Pi to hold the encryption key. In rare event of reboot I have to ssh in and manually enter the LUKS key.
This setup is still prone to an evil maid attack as someone could replace or modify the SD card to log that key. That scenario is highly unlikely as I am no particular interest to anyone. What is slightly more realistic is that someone could brake into my house to steal stuff. For that my data is secure as the key is lost the moment you power off the Raspberry Pi.
Overall I'm pretty happy with that setup. My Raspberry Pi slowly blinks with it onboard red LED to indicate that all that services run well and alarms me with fast blinks if something is not right.
I find myself rarely do triggers. Not because I can't. It's just more handy to do on the ActiveRecord layer having access to all my ruby code.
Indexes, indexes on PL/pgsql procedures, foreign keys and constraints – they absolutely have their place in Rails applications.
Although you could do a rather complicated SELECT's with ActiveRecord, sometimes, for particular queries, I prefer to create a database VIEW and then point the ActiveRecord model to it.
I was lucky to not hit OOM and I've got 5.648s for setting properties outside of the constructor and 3.680s for setting them inside of the constructor, so just as the post predicts.
At the same time, if I'm trying to simplify the test case and set only numeric values and not object ones, I've got nearly the same results: 3.953s and 3.922s for 10x more iterations (prop-benchmark-f.js and prop-benchmark-g.js).
(node 4.0.0 on Mac OS)
Probably I got something wrong, but setting properties inside the constructor function (prop-benchmark-b.js) are almost 6 times slower that setting them outside of it (prop-benchmark-a.js)
https://gist.github.com/senotrusov/597514c773089b6989c6
What do you think, why I got such a different numbers?
Thank you!
Wall Street International Magazine (wsimag.com) is searching for entry/mid Level HTML/JavaScript software engineer, for the full-time job in Budva, Montenegro (Europe). We are willing to arrange relocation.
HTML/CSS/JavaScript (possibly React) and simple server-side logic with Ruby on Rails.
We expect the candidate to be able to focus on the creating exceptional web-pages, produced with solid understanding of HTML and related technologies. We have a multinational team, our primary language of communication in office is English.
If you are interested in this position, please send your resume to [email protected]
Thank you.
Show HN: A tool to mark duplicates in iPhoto library – simple, fast, open source
https://github.com/senotrusov/redis-call - A Ruby library to access Redis using Hiredis takes care of thread-aware connections, handy API for keys' names construction, transactions and queues.
A social content creation tool with cartography features.
A document consist of sections, sections contain paragraphs. One single paragraph may have many instances across different documents.
Users can repost paragraphs, createdby someone else. When the original author updates the paragraph then that update propagates to all the instances.
Similar, one section may simultaneously exists in different documents. Any changes in that section are visible in all that documents.
Forced anonymity but you can track individual contributor in the scope of a single discussion (visible user ids started from 1 for each thread).