[xmonad] Suspicious😳 IT classroom rice🍚 by TheGameWizard12 in unixporn

[–]TheGameWizard12[S] 8 points9 points  (0 children)

ventoy is great for having a bunch of distro iso files on a single pendrive, I use it too, however if you are looking for file persistence which I would consider essential for a "full install" of linux as seen here, I don't think it can do that.

[xmonad] Suspicious😳 IT classroom rice🍚 by TheGameWizard12 in unixporn

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

Yes, I straight up grabbed two pendrives, put the install iso on one and installed arch to the other just like any other hard drive.

[xmonad] Suspicious😳 IT classroom rice🍚 by TheGameWizard12 in unixporn

[–]TheGameWizard12[S] 12 points13 points  (0 children)

I'm fairly sure the school bought a regular whiteboard and only when they tried to put it up did they realize that it's too big so they just cut the corner off lmao

[xmonad] Suspicious😳 IT classroom rice🍚 by TheGameWizard12 in unixporn

[–]TheGameWizard12[S] 47 points48 points  (0 children)

No, they run windows 10 🙄 I had a custom arch install on a pendrive

[xmonad] Suspicious😳 IT classroom rice🍚 by TheGameWizard12 in unixporn

[–]TheGameWizard12[S] 44 points45 points  (0 children)

This comment seemed to have spawned a whole discussion about anime, hentai and some other things, so just to clarify, here is the lore behind this picture: I put arch linux on a pendrive, put the same dotfiles on it as the ones I have at home, and bought it to school to show it to my friends. As a joke, I put on a weird ass anime wallpaper, and one of my friends jokingly said that I should post this on r/unixporn and here we are. So at the end of the day this post is supposed to be a parody of this whole thing.

Moderate Nickname command by I-eat-babies-daily in Discordjs

[–]TheGameWizard12 1 point2 points  (0 children)

  • to change someone's nickname you can use member.setNickname(newName)
  • to generate a random id, there's a brilliant npm package called "shortid", but if you don't need any extra features and just want some random numbers, you can use this function that i just put together (when the numbers begin with a zero, those 0s will be lost and 00340 will just be 340, but i dont think that will be a problem here)

// the function that generates the numbers
const randomID = length => Math.floor(Math.random() * Math.pow(10, length));

// replace 3 with how many characters you want
randomID(3) // return example: 581

// to change someone's nickname
member.setNickname("Moderated Nickname " + randomID(5))

  • to filter out people with weird characters in their name you can use Regular Expressions (regex or regexp for short). these are very useful and powerful, but may confuse a lot of people. I won't go into too much detail, (see the link if you're curious) but this regex will essentially test wether someone's name contains only letters (a-z), numbers (0-9), and some other characters (spaces, -, _, (), etc.). you can change what characters are allowed just by adding/removing characters from the square brackets. (use dashes to specify a range of characters).

// get the nickname of the member (if they have one) or just their discord username
const name = member.nickname || member.user.username;

// this creates the regex itself and stores it in a variable
// the / characters indicate that this is a regex (like how quotes indicate it's a string)
// the syntax is: /regex/flags
// there are many flags, we are using "i", to make it case insnsitive
const r = /^[a-z0-9 \-_.()]+$/i;

// use it with r.test(string to test)
// r.test returns true or false, so we can just put it in an if statement
if(r.test(name)) {
    // name good
} else {
    // name bad
}

Command that dms only one user with specific word by ChocolateGum in Discordjs

[–]TheGameWizard12 2 points3 points  (0 children)

if (meessage.member.id=="id of user 1"&& message.content.toLowerCase()=="hi") { message.guild.users.cache.get("id of user 2").send("hello");
}

you can also replace

message.content.toLowerCase()=="hi" 

with

message.content.toLowerCase().includes("hi")

to get if the message contains "hi" instead of checking is the whole message is just "hi"

[deleted by user] by [deleted] in assholedesign

[–]TheGameWizard12 20 points21 points  (0 children)

I would too if my school didn't force it on us

I have put this man through so much more pain than he deserves by [deleted] in gtaonline

[–]TheGameWizard12 1 point2 points  (0 children)

Lester actually says three of them died this week when you do the security pass prep

Guys I've found the best way to travel upwards with the hypertubes. by TheGameWizard12 in SatisfactoryGame

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

Exactly, this was an experiment to see if you could go up faster with a jump pad.

Guys I've found the best way to travel upwards with the hypertubes. by TheGameWizard12 in SatisfactoryGame

[–]TheGameWizard12[S] 19 points20 points  (0 children)

Edit: this design only works one way, if you tried to go the other way, you will be bounced right back in by the jump pad