Interests: programming, video games, anime, music composition

I used to be on kbin as [email protected] before it broke down.

  • 1 Post
  • 51 Comments
Joined 11 months ago
cake
Cake day: November 27th, 2023

help-circle

  • I’m not sure what the best way to make using it convenient is, but you could paste something like this into the JS console to rewrite all the r.php links:

    (function() {
      let links = [...document.getElementsByTagName("a")];
      links.forEach(link => {
        if(link.href.startsWith("https://skimfeed.com/r.php"))
        {
          let url = new URL(link.href);
          let clean_link = url.searchParams.get("u");
          link.href = clean_link;
        }
      });
    })();
    

    The basic idea of my JS snippet is that it looks for all the anchor tags (i.e. <a href='...'>), finds the ones that link to r.php, extracts the u query parameter which appears to contain the actual URL of interest, and then replaces the href attribute of the anchor (i.e. the part of the HTML that contains the destination URL) with the clean URL. That entire snippet of logic is wrapped in an anonymous function which is then immediately called so that you can just paste the snippet in more or less wherever it makes sense to trigger the logic.

    Way back in the day I would’ve stuck snippets like that into GreaseMonkey scripts, but I haven’t messed with that stuff in a long time and I’m not sure which extensions are still good to use for doing that kind of thing.

    Apologies in advance if my snippet is not perfectly correct; I’m not familiar with that site and wrote this off the cuff when I saw your post. Hopefully it’s helpful though.


  • You can do this by configuring an HTTP server (e.g. Apache) to listen on port 80 and/or 443 (HTTP and HTTPS standard ports, respectively) and select which site to serve based on the name of the site requested. Apache documentation for this feature is here: https://httpd.apache.org/docs/2.4/vhosts/name-based.html

    Note the sample config snippet showing how to set up a simple static site serving both www.example.com and other.example.com using ServerName in a VirtualHost to select between them.

    You can also have Apache match a pattern in the URL and reverse proxy to another HTTP server – that can just be another program on the same computer listening on a different port, or could be on another computer entirely. See the simple reverse proxy config example on this page for a starting point: https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html (Note also that you probably don’t need anything further down that page – e.g. the load balancer and failover stuff is not likely to be useful to you for a small personal project.)

    Other popular HTTP servers can do this too; I just happen to have done it with Apache before.






  • If you want to improve significantly, go read someone else’s code and modify it. Try to fix a bug in a program you use, add a feature you want that doesn’t exist already, or even just do something simple for the sake of proving to yourself that you can do it – like compiling it from source and figuring out how to change some small snippet of text in a message box. Even if you don’t succeed, if you put in a serious effort attempting it, you will almost certainly learn a lot from trying.

    Edit: changed wording to try to be clearer



  • How 'bout that! :D

    If the SSD itself is OK, then it was probably trying to boot the SSD still. The blank screen issue might have to do with the graphics drivers then? I remember having a similar blank screen problem with Ubuntu a long time ago where I had to put in “nomodeset” as a parameter in GRUB when booting until I got the right drivers set up.


  • the tablet supports pxe boot. Do you think I could get mileage off of that if I set up a server on my other laptop and connected them via ethernet?

    Maybe. If it’s not too much trouble to set up and you can’t get the USB to work again, might as well try it before throwing in the towel.

    I’m rather confused by the fact that the USB drive worked for you before but doesn’t any more and yet seems to be OK on other systems. Is there anything like “fast boot” enabled in the BIOS maybe? (Try turning that off if so.)

    Also, when you’re trying to boot from the SSD, can you get anything out of GRUB by tapping shift or escape (or maybe other keys) while it’s trying to boot?


  • Do you think that removing the ssd will help?

    It’s a sanity check to help you rule out things like unintentionally booting from the wrong device. Can’t boot from hardware that’s not there! If the USB does work with it removed, then something you believe about how the device boots is false and you can then try to figure out what. A lot of BIOSes will “helpfully” try the next device in the sequence if it can’t successfully boot from the first one – which can be really confusing when debugging.

    Some other thoughts for things to check: does the device confirm that it can actually see the USB drive in some way? Does a USB keyboard work in the port you’re using? If there’s more than one USB port, have you tried a different port? Do your USB drives work in another computer?


  • I rebooted to the installation media to try another install. It was black too.

    I assume you’ve probably already checked, but in case not, is the boot order correct? What happens if you remove the SSD entirely and try to reboot to the USB without it?

    Also, does the SSD boot in another computer?

    If you can’t get anything to boot on the tablet, I’d RMA it.




  • I wrote something like this before for academic researchers to load data sets on display walls by using their cellphones. I approached it by building a simple website. When the user logs in, they’d see a table of entries (from a directory listing on a shared file server that they could drop their data sets onto) and could click a button that made a form post to the server which caused it to run whichever programs were needed to load the data set they wanted (or run a couple of other handy commands – like turning the monitors on/off, etc).

    You can do something like that too in Python if you want:

    1. Learn how to start and stop programs from Python scripts. This can be done with the built-in subprocess library. If you know how to launch the programs you want from the command line, it shouldn’t be too hard to figure out how to do it from Python by reading the documentation. It will take some more effort to figure out how to interact with it (e.g. to stop it from user input) without blocking your script, but this can be done.
    2. Learn how to write a simple program that can respond to HTTP requests in Python. There are a number of libraries like tornado, flask, cherrypy, etc. that can do this. Pick one, read the documentation, and write a tiny page that allows you to submit a form and then trigger an action on the server in response to an HTTP POST. You should be able to interact with it by pointing the browser on your computer to localhost (possibly plus a port) or from on your LAN by putting the IP of your computer into the address bar.
    3. Figure out how you’re going to organize the entries you want to be able to load. You could just do something trivial like putting the files in known folders and running os.listdir, or something more involved like tracking the entries with a spreadsheet or database or JSON file that lets you associate custom metadata with each entry (like a custom name to show or an icon to display or when it was last launched, etc.)
    4. Generate a web page based on that data collection. I recommend using templating – e.g. with mustache, or jinja, etc. Basically you write some HTML-like text that lets you indicate places to fill in data from your program and it will do the conversion of symbols like < into &lt; that are needed for HTML output and also repeat patterns using entries from lists you provide to build the rows of tables and such for you.
    5. Set up some security (e.g. a simple log in system) and polish it up as much as you care to do.

    Good luck and have fun!



  • Aww, I’m not trying to stomp anyone. :(

    I was just curious if it was actually the full list and before I knew it I’d spent 45 minutes checking Pokemon names to figure out what was missing, so I figured I’d share the corrections.

    If Kolanaki got that close just from memory, that’s pretty impressive! I had to look it up!


  • e0qdk@reddthat.comtoMemes@sopuli.xyzIt's been so long
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    4 months ago
    • Electrode, Diglett, Nidoran♂, Mankey, Venusaur, Rattata, Fearow, Pidgey, Seaking, Jolteon, Dragonite, Gastly, Ponyta, Vaporeon, Poliwrath, Butterfree, Venomoth, Poliwag, Nidorino, Golduck, Ivysaur, Grimer, Victreebel, Moltres, Nidoking, Farfetch’d, Abra, Jigglypuff, Kingler, Rhyhorn, Clefable, Wigglytuff
    • Zubat, Primeape, Meowth, Onix, Geodude, Rapidash, Magneton, Snorlax, Gengar, Tangela, Goldeen, Spearow, Weezing, Seel, Gyarados, Slowbro, Kabuto, Persian, Paras, Horsea, Raticate, Magnemite, Kadabra, Weepinbell, Ditto, Cloyster, Caterpie, Sandshrew, Bulbasaur, Charmander, Golem, Pikachu
    • Alakazam, Doduo, Venonat, Machoke, Kangaskhan, Hypno, Electabuzz, Flareon, Blastoise, Poliwhirl, Oddish, Drowzee, Raichu, Nidoqueen, Bellsprout, Starmie, Metapod, Marowak, Kakuna, Clefairy, Dodrio, Seadra, Vileplume, Krabby, Lickitung, Tauros, Weedle, Nidoran♀, Machop, Shellder, Porygon, Hitmonchan
    • Articuno, Jynx, Nidorina, Beedrill, Haunter, Squirtle, Chansey, Parasect, Exeggcute, Muk, Dewgong, Pidgeotto, Lapras, Vulpix, Rhydon, Charizard, Machamp, Pinsir, Koffing, Dugtrio, Golbat, Staryu, Magikarp, Ninetales, Ekans, Omastar, Scyther, Tentacool, Dragonair, Magmar
    • Sandslash, Hitmonlee, Psyduck, Arcanine, Eevee, Exeggutor, Kabutops, Zapdos, Dratini, Growlithe, Mr. Mime, Cubone, Graveler, Voltorb, Gloom, Charmeleon, Wartortle, Mewtwo, Tentacruel, Aerodactyl, Omanyte, Slowpoke, Pidgeot, Arbok

    I noticed while making this list that Lickitung was incorrectly spelled “LIKITUNG” on the third day.

    Edit: Also, for Nidoran♂ vs Nidoran♀ you have to look at the picture to distinguish since they just say “Nidoran” but they do say it twice!


  • That’s pretty good! But… that’s only 147. :-)

    Nidoran♀, and Nidoran♂ are separate and you’re missing Nidorina, Nidoqueen, and also Rhydon.

    Some other corrections:

    • Pigeotto -> Pidgeotto
    • Ninetails -> Ninetales
    • Diglit -> Diglett
    • Primape -> Primeape
    • Duouo -> Doduo
    • Cloysyer -> Cloyster
    • Ghastly -> Gastly
    • Electrabuzz -> Electabuzz
    • Gyrados -> Gyarados
    • Omantyte -> Omanyte
    • Arodactyl -> Aerodactyl

    (Yes, I looked it up. No, I have no life. :p)

    Cheers!