Posts

Total meal replacement with Soylent and other alternatives

Image
Looking for a complete replacement of all my meals using Soylent or other similar products. Most of these companies allow you to buy their products cheaper if you "subscribe", which means they periodically send you more of the same product. Since you can cancel whenever you want, including (presumably) right after buying for the first time, the prices in this post include that subscription discount. A "meal" for the purposes of this post is one fifth of the reference intake (RI), this is, around 20% of the necessary calories, macros, vitamins, and minerals that you need each day. Soylent Doesn't ship to Europe. Joylent, now Jimmy Joy Their only product is called Plenny Shake v3.0 .  Price is €1.43 per meal, that is €214.8 per month . Huel Their cheapest product is called Huel Essential .  Price is €1.29 per meal, that is €193.5 per month . If you buy over €100 worth of products, you get a 10% discount: that's €1.17 per meal, or €175.65 per month . Unbeatable...

Detecting who's capturing graveyards in Alterac Valley

In the current Alterac Valley meta, capturing graveyards goes against the interests of the group. Therefore it is of some value to be able to tell who's doing it. In this post I describe the process I followed to create an addon that sends an alert when someone is capping graveyards. Spell detection When a flag is being captured in Alterac Valley (or Arathi Basin for that matter) spell#24390 is cast by the player. That spell is marked as hidden but by modifying Spell.dbc we can make the client show it and expose it to the Lua API. Although the event COMBAT_LOG_EVENT_UNFILTERED shows the spell being cast, it doesn't show the target of the cast, since it's not a unit but a gameobject. This makes it impossible to tell if it's a graveyard or a base that's being captured, so this option is not optimal, since you would be sending alerts when someone started capturing a tower. I thought of using GetMinimapZoneText to detect if I was in the proximity of a graveyard before s...

Recovering entire folders using ddrescue

I had to recover the contents of a hard disk using ddrescue because the hardware was faulty. The normal course of action involves using ddrescue on the entire disk or partition to make an image but that was not an option here because the hard disk was simply too big - the resulting image wouldn't fit in any of my other disks, not even after compression. According to the documentation it was also possible to use ddrescue on individual files, but not on entire folders. But that was precisely what I had: a huge hierarchy of folders and files that I wanted to keep. Let's consider that we have two folders, /source with the damaged filesystem, and /target where we will store whatever we can salvage. Let's move to the source drive first: cd /source First we create the directory structure that will hold the files in the target disk: find -type d -print -exec mkdir -p '/target/{}' \; Then, we start moving the files: find -type f -print -exec mv '{}' '/target/{}...

Using WireGuard to forward ports from behind a CG-NAT

I am using WireGuard, which I have installed on my VPS, to be able to forward ("open") some ports that I need to run SoulSeek, even when my ISP has put me behind a CG-NAT. I imagine that these instructions (after some adjustments) can be used for other VPN solutions and other applications that need you to forward some ports to run properly such as BitTorrent clients and such. This tutorial assumes that you already have WireGuard installed and running. If not, you can use any other tutorial or script to install WireGuard . The easy way would be to install the WireGuard client on Windows and then load your configuration file, but that would mean that all your traffic gets routed through your VPN, which is something that I want to avoid. WireGuard First we need to install the WireGuard client and make some changes to the client configuration file so, by default, no traffic goes through the VPN. Every connection has what we call a "metric" which is something like the pr...

Bookmarks

 My list of bookmarks, rescued from my old blog. Reset NTFS ACLs  ( another source ) rundll32 Shell32,Control_RunDLL input.dll,,{C07337D3-DB2C-4D0B-9A93-B722A6C106E2} — disable all keyboard layout switching shortcuts. powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 60 powercfg.exe /SETACTIVE SCHEME_CURRENT — change the amount of time it takes for the screen to power off after you lock your computer. mountvol E: /s bcdboot D:\Windows -s E: — fix a broken BCD (D is the system disk, E is the ESP). rsync -arvzP --bwlimit=1000 example.com:~/folder/ . — synchronise two folders. In C:\Program Files\Microsoft Office\Office16: cscript OSPP.VBS /dstatus cscript OSPP.VBS /unpkey:XXXXX (remove the one that’s wrong) cscript OSPP.VBS /inpkey:XXXXX-XXXXX-... (install a new one) cscript OSPP.VBS /sethst:kms.example.com cscript OSPP.VBS /act — activate a copy of Office 2019. Only works with volume licences (VL). -noforcemaccel -noforcemparms -noforcemspd — launch pa...

Warmane: scripts sent by Sentinel

During login and while you play, Sentinel sends some Lua code to your client using the addon message channel. It's not clear to me how this code is executed once it arrives to the client or why is it being sent using addon messages. Some of these scripts add UI features while others try to catch cheaters.  I am publishing this as a technical curiosity more than anything else. Excuse the format, I know how much blogspot sucks for posting snippets. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if( OriginalClearTarget ==nil)then     OriginalClearTarget=ClearTarget     ClearTarget=function()         if(issecure())then             OriginalClearTarget()         else             RegisteredFrames={GetFramesRegisteredForEvent("MACRO_ACTION_FORBIDDEN")}             RegisteredFramesCount=getn(RegisteredFrames)       ...

On IRCCloud

I've known irccloud (or ircclown as some call it) for some time; we've had an on-again, off-again relationship for years. My biggest gripe with it is that, if you don't pay, it disconnects you after a few hours of inactivity (inactivity being described as not having an irccloud tab open: you don't have to talk if you don't want to). Also it doesn't let you connect to more than two servers, and you can't use server passwords, but who needs anything else than passwordless efnet, right? Keeping the connection alive I tried writing a script myself. The idea was that every x minutes the script would log in, idle for a few seconds, then disconnect. That should be enough. Well, I tried, and it didn't work. I kept getting disconnected. Obviously I had to work on it a little bit more, but then I found this:  https://github.com/osm/icka/ It's neat: it works. You just put it in your crontab and forget about it. */30 * * * * ./icka/icka -email 'thisis@myema...