side-teched
side-teched
just getting side teched
11 posts
computing misadventures for you experienced by me
Last active 3 hours ago
Don't wanna be here? Send us removal request.
side-teched · 10 months ago
Text
I don't mind Apple products and the various tradeoffs that come with them, but if you hate them, I have good news for you. The reviews are coming in and at long last it seems like Qualcomm is making chips that can actually stand their ground against Apple's: if you get a laptop with a Snapdragon X Pro/Elite chip in you'll finally get the performance + ludicrous battery life that the Apple people have been lording over you since 2020.
727 notes · View notes
side-teched · 2 years ago
Text
pfSense on 802.1x authenticated WAN
So today I was setting up pfSense in my dorm at uni. pfSense as per usual is pretty easy to set up if you only need a basic configuration. Buuuuuut, the GUI doesn't have native support for 802.1x authentication on wired connections.
This Reddit post helped me figure out how to set up the wpa_supplicant to perform the authentication.
The guidance is a little out of the date, but the only thing that doesn't just straight up work is generating the password.
> echo -n password_here | iconv -t utf16le | openssl md4
It's not hard to fix this, openSSL just doesn't like you using MD4 anymore because its outdated, but you can still use it through the legacy system.
> echo -n password_here | iconv -t utf16le | openssl dgst -md4 -provider legacy
0 notes
side-teched · 2 years ago
Text
Had my bacon absolutely saved today by this blog post!
Windows decided to overwrite my efi partician after an update for some reason.
I've reinstalled grub before, but only on Arch. This article is pretty good for several different distros (including Ubuntu)
I would add one thing to this article though, I found:
> sudo fdisk -l /dev/...
was a much easier way to identify the correct particians.
1 note · View note
side-teched · 2 years ago
Text
Git gets sooo much easier once you get branches are just pointers to commits
git
i was configuring my emacs and suddendly realized how unhappier would I be if I did not know of git reset HEAD~1, git reset --hard HEAD~1 and git commit --amend. Like, if you're someone who commits quick mistakes frequently these are just godsent. If you do not know, here's a summary.
git reset HEAD~1
This command basically asks git to forget that you've typed "git commit ..." in the command line. All the changes will be there, but unstaged. This is SO useful when you end up comitting too much stuff or want to change some stuff in the last commit you did, it is just incredible. You can use git reset to undo more "git commit"s as well, but HEAD~1 is usually enough. Note that this command basically does not affect your files in your working directory, it just affects the git commit history.
git reset --hard HEAD~1
This is the danger/velociraptor version of git reset. Unlike its cousin, reset --hard not only undoes the last "git commit" terminal command, but it also undoes the changes of the last commit. Use this when you realize that your last modifications to the project were just way too powerful for this world and you want to try again differently. Use with caution.
git commit --amend
The --amend flag in git commit is pretty useful, it is a nice alternative to git reset HEAD~1. When you use --amend, instead of adding a new commit, git will just replace the last commit you did with this new commit you're adding. I like to use this one to fix typos in commit messages, as all i need to do is reload the original command from the terminal, change the commit message and add the --amend flag.
:v
146 notes · View notes
side-teched · 2 years ago
Text
Xenia [Canary] (a Xbox 360 emulator) throwing out a warning accusing you of piracy if it detects ISO files, a DISC IMAGE FORMAT, is the funniest thing i've seen all day
Tumblr media
Apparently the warning beeps at full volume on your PC too, this has to be a prank even if windows audio is disabled, it will blast your eardrums this is borderline malicious
Tumblr media
"moron flag" The developers of the emulator are calling people not wanting to get their ears blasted "morons"
Tumblr media
i think the developers of this emulator are a little tired
Tumblr media
lmao
Tumblr media
No way this is a real error
Tumblr media
Update: They've lowered the pitch (but not the volume) of the beeping noise due to it "being downright painful". Ya think??
Tumblr media
Guys you don't get it, actually rupturing our user's eardrums is for their BENEFIT, they won't make themselves look silly on discord! 😅
Tumblr media
The beeping noise is gone, so it's just a nagging message now. I think this whole situation was a little silly tbh It needs to be made clear this happened in the Xenia Canary repository, which despite being very commonly used and recommended as well as frequently updated, is not the MAIN Xenia repository and has a different set of contributors.
(posted by MeovvCAT, 26 July 2023)
[unrolled version on threadreaderapp]
EDIT: additional statements from the team and the specific dev who added this:
Tumblr media Tumblr media
“the original intention of the popup was to grab the attention of the user to notify them that ISO files are commonly associated with XBox 360 piracy (we're not saying people who use ISO files are pirates)”
^this is still deranged tbh
142 notes · View notes
side-teched · 2 years ago
Photo
Tumblr media
Unmentionables on Tumblr: When you enter the @ symbol and a username on Tumblr, you can mention a blog, sending that blog account a notification. Unless you can’t. Here are some cases where Tumblr usernames won’t show up in results when you try to “@mention” them, or the mention notification won’t go through.
The setting for "Allow this blog to appear in search results” is turned off for the blog. User mention relies on a Tumblr user search, and disallowing all searches for the blog includes opting out of the user mention search.
The blog is identified as adult-oriented/not safe for work in its blog settings (and you are not following the NSFW blog).
The blog is a secondary blog that is password protected.
The blog account doing the mentioning is so new that Tumblr won’t send mention notifications as an anti-spam measure.
The blog account doing the mentioning was blocked. So if you block a blog, that shunned blog cannot “@mention” your blog on Tumblr.
8K notes · View notes
side-teched · 2 years ago
Text
I truly hate to tell you all this, but the reason needle sizes are numbered that way (smaller numbers = bigger needles) is BECAUSE SOME ASSHOLE HAD A 1-INCH DIAMETER CYLINDER AND LABELED HIS NEEDLES' SIZES BY HOW MANY NEEDLES HE COULD SHOVE IN THERE.
Like, 24 24-gauge needles can fit in a 1-inch cylinder. 18 18-gauge needles can fit in a 1-inch cylinder. Wrong and horrible. The worst possible way to measure a needle. Good night.
21K notes · View notes
side-teched · 2 years ago
Text
git
i was configuring my emacs and suddendly realized how unhappier would I be if I did not know of git reset HEAD~1, git reset --hard HEAD~1 and git commit --amend. Like, if you're someone who commits quick mistakes frequently these are just godsent. If you do not know, here's a summary.
git reset HEAD~1
This command basically asks git to forget that you've typed "git commit ..." in the command line. All the changes will be there, but unstaged. This is SO useful when you end up comitting too much stuff or want to change some stuff in the last commit you did, it is just incredible. You can use git reset to undo more "git commit"s as well, but HEAD~1 is usually enough. Note that this command basically does not affect your files in your working directory, it just affects the git commit history.
git reset --hard HEAD~1
This is the danger/velociraptor version of git reset. Unlike its cousin, reset --hard not only undoes the last "git commit" terminal command, but it also undoes the changes of the last commit. Use this when you realize that your last modifications to the project were just way too powerful for this world and you want to try again differently. Use with caution.
git commit --amend
The --amend flag in git commit is pretty useful, it is a nice alternative to git reset HEAD~1. When you use --amend, instead of adding a new commit, git will just replace the last commit you did with this new commit you're adding. I like to use this one to fix typos in commit messages, as all i need to do is reload the original command from the terminal, change the commit message and add the --amend flag.
:v
146 notes · View notes
side-teched · 2 years ago
Text
Javascript's not very optional "optional semicolons"
It's something we all hear about: Javascript's semicolons are optional except when they aren't. But it's actually kinda surprising how many people haven't encountered what this is referring to. So I thought I would share a real example encountered by Jr. Dev at work (well an example snippet version of what they encountered, NDAs gotta be followed and all that).
So for various reasons they needed to set up an anonymous async function and use a then to attach an async callback. They ended up with something like this:
console.log("I am a line of code that works") (async () => { console.log("I'm doing some async things") await new Promise(resolve => setTimeout(resolve, 1000)); })().then(() => { console.log("Done!") })
It's a clever little construction actually. But what's weird is that there's now an error on the first line (Firefox):
Uncaught TypeError: console.log(...) is not a function
Why is the line before borked? Like it'd make sense if the weird async bit had an error, but no, it's the entirely normal console.log call.
Well it's because Javascript doesn't always treat whitespace the same. When something is in brackets Javascript gives 0 hoots about the whitespace between it and the previous token. So what the interpreter is actually seeing is this:
console.log(...)(...).then(...)
It thinks you are trying to call the result of console.log and attach an async callback to the result of that. console.log 'returns' undefined. undefined is not a function. Hence the error "console.log(...) is not a function".
The way to solve this is to add the good ol' "optional" semicolon back into the code like this:
console.log("I am a line of code that works"); (async () => { ...
Now the interpreter knows that the first line is a complete statement, and it will no longer think you are trying to call it as a function.
Don't forget your semicolons, people!
0 notes
side-teched · 2 years ago
Text
Javascript date jank
So I'd thought I'd share a lovely piece of Javascript jank one of the other devs at work encountered.
Also, before we begin: this isn't implementation advice, don't do this. It is bad. It's just some fun stuff we found. (with that out of the way...)
So what they were trying to do was get a date object for a specific amount of time before/after another date object. This is what they tried:
let myDate = new Date() let myNewDate = new Date(myDate - (numMinutes * 60 * 1000))
Hopefully it's pretty clear what it's trying to do. It's trying to make a Date numMinutes before myDate. And this does what you would expect: so far so good!
So next they were trying to get a Date object for numMinutes later than myDate. Given what we just saw, easy right?
let myDate = new Date() let myNewDate = new Date(myDate + (numMinutes * 60 * 1000))
And just quickly typing this into the console as sanity check (on Firefox):
Invalid Date
huh? Wha?
Yeah, it took me a sec too.
Basically, what's going on here is the Javascript interpreter is trying be helpful. When the interpreter is running the version with the minus, it sees you are trying to subtract a number from a Date object. This doesn't make any sense, so it ever helpfully steps in and just tries to make it work. And it does. It decides it needs to coerce the type of at least one of the variables. It figures out if it converts the date into a Unix timestamp (which is just a number) the subtraction works! The resulting number is given to the Date constructor and it interprets the number as a Unix timestamp and spits out the correct answer.
Yipeeeeeee
But why does the version with the plus not work?
It's the same principle. The interpreter sees that you are trying to add a Date and a number, which doesn't make any sense. So it tries to be helpful and make the types work. It just so happens the interpreter figures out if it casts the Date to a string and the number to a string they can be plussed together. This makes it a string concatenation. So a valid date string with a random number on the end get passed to the Date constructor, and hey presto, Invalid Date!
0 notes
side-teched · 2 years ago
Text
Wikipedia article this caused me to visit: Object Storage | --- > Block (data storage) | --- > Dynamic data | | --- > Persistent data | --- > Strong Consistency
we dont talk enough about how awesome folders on the computer are
59K notes · View notes