files.catbox.moe

JoMiran, (edited ) to piracy in Naming Torrents
@JoMiran@lemmy.ml avatar

Dealing with spaces while scripting or in terminal is such a pain in the ass. The true dark path of horror is using spaces indeed.

adespoton,

“\ “ and [tab] and * are your friends. I’ve been using spaces in Unix filesystems since the early 90s with no issues. Also, using terminal fonts that•put•a•faint•dot•in•each•space•character helps.

ShaunaTheDead,
@ShaunaTheDead@kbin.social avatar

Yeah, either put quotes around it '/like this/you can incorporate/spaces/into your paths' or /just\ escape/your\ spaces/like\ this

silasmariner,

This is fine for the most basic of use cases but once you start looping through file names or what have you, you have to start writing robust correct bash and nobody does that

gears, (edited )

It gets real crazy when you’re sending remote commands so you have to escape the escapes so that the remote keeps them and properly escapes the space

ssh -t remote "mv /home/me/folder\ with \ spaces /home/me/downloads/

LocustOfControl,

Yup, this is me with scp. Well, it would be if I didn’t just use asterisks to avoid that PITA.

PoolloverNathan, (edited )

Does SSH require quoting commands?

gears,

It doesn’t for commands without spaces (i.e reboot) You might be able to escape the spaces and not use quotes, I’m not sure

PoolloverNathan,

Might be client-dependent; I’ve regularly ran commands with spaces (e.g. ssh a@a.local ssh b@b.local) without a problem.

cobra89,

Yeah but at least with periods in the title tab complete will just complete the file name all the way while with a filename with spaces I have to escape the damn space with “\ ” like you said. Why do more work when I don’t have to?

Euphoma,

My shell seems to autocomplete filenames that have spaces with “\ ” already.

skullgiver, (edited )
@skullgiver@popplesburger.hilciferous.nl avatar

deleted_by_author

  • Loading...
  • reverendsteveii,

    I work on a Web app and we recently decided that we’re just not gonna support double quotes in free text fields because oh holy balls what a thing it is to try to deal with those in a way that doesn’t open you up to multiple encoding vulnerabilities.

    FooBarrington,

    That’s… Surprising. If you’re doing things right, double quotes should be no trouble at all:

    • HTTP requests have simple, automatic encoding
    • SQL queries with prepared statements don’t need any special handling for double quotes
    • Rendering the data should happen with proper escaping etc.

    They are usually only trouble if you’re doing SQL queries wrong (concatenation etc.) or if you’re not escaping your output.

    reverendsteveii, (edited )

    The issue is the filter that we’re using to avoid multiple encoding attacks de-escapes everything via multiple rounds, then tries to pass it to the next layer of filtering with the de-escaped request body as a json string. Your absolutely right that this is a silly way of doing it, but sometimes we have to live with decisions that were made before we were onboarded to a project. In this particular case, I pushed to improve the filters but all our PO heard was “spend development time weakening security” and at the end of the day they decide what to do and we do it.

    FooBarrington,

    Ah, that’s understandable. Sorry you have to go through that!

    WarmApplePieShrek,

    The filter you’re using to avoid multiple encoding attacks creates multiple encoding attacks.

    reverendsteveii, (edited )

    You should tell that to OWASP then, they wrote it. org.owasp.esapi 2.5.2.0, class is Encoder, method is canonicalize(String, bool, bool)

    WarmApplePieShrek,

    This method is a band-aid patch when your downstream code is all messed up and you can’t fix it. Instead of treating the input string correctly, it just removes anything that might possibly trigger some vulnerability in wrong code.

    pete_the_cat, (edited )

    It’s a way bigger pain in the ass than people think it is. I remember having to parse output from a tool for work that had tons of output in tabular format, mixed with normal sentence like strings. JSON, YAML, or XML outputs weren’t available so I had to do a nasty mess of grep, awk, cut, and head/tail, to get what I wanted. My first attempt was literally counting the characters so I could cut out exactly what I needed, but as we all know, hardcoding values is a recipe for headaches later on.

    JoMiran, (edited )
    @JoMiran@lemmy.ml avatar

    Here’s a horror story from literally yesterday. We have been fighting a system for a client for weeks and it has been a nightmare. Our clients just told us that they outsourced some of their work to an Indian outfit but that outfit is unfamiliar with Linux and doesn’t know how to edit text files so they have been downloading the files to their Windows machines, editing them in Windows, then uploading the contaminated text files back into Linux. None of them, not our client nor the outfit they hired, understood why this was a problem. We have no idea what files are affected and we won’t know until they fail because they obviously did not keep track of what they touched.

    EDIT: I’m being intentionally vague.

    reverendsteveii,

    The only reasonable response to this behavior is disproportionate violence

    porksoda,

    Haha this is up there with having to explain why opening a csv in Excel and then saving means that I don’t want the file.

    ramblinguy,

    I will never forgive excel for automatically converting all of my dates to some weird ass format, or stripping single quotes randomly, or something other BS that they do for no reason

    DarkDarkHouse,
    @DarkDarkHouse@lemmy.sdf.org avatar

    My absolute favourite is stripping leading zeroes from any text that looks like a number, then displaying it in scientific notation. But we get Copilot, so it balances out, right?

    murtaza64,

    If this is about line endings, surely a simple shell or python script could correct them?

    m_randall,

    There’s already a command for it:

    linux.die.net/man/1/dos2unix

    Astaroth, (edited )

    Does windows add an extra character at the end that gets converted to new line on linux? Because the other day I were copying a script and after pasting it an extra line was added after every single line, even the empty lines.

    how it looked when I copied it:

    
    <span style="color:#323232;">bla
    </span><span style="color:#323232;">bla
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">bla
    </span>
    

    what it turned into:

    
    <span style="color:#323232;">bla
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">bla
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">bla
    </span><span style="color:#323232;"> 
    </span>
    
    candybrie,

    Windows uses CR LF (carriage return, line feed), whereas Unix just uses LF. For added fun, macs use CR.

    noughtnaut,
    @noughtnaut@lemmy.world avatar

    For added fun, macs use CR.

    This used to be true, for sure, but I thought this changed with OS X (which is essentially PrettyBSD) ?

    candybrie,

    You’re right. Notepad++ still lists macs as using CR for their EOL conversion tool, so I didn’t realize.

    elscallr,
    @elscallr@lemmy.world avatar

    You can just grep for carriage returns followed by newlines, grep -Pirn ‘rn$’ /path/to/whatever. It’ll identify all your problematic files.

    Amends1782,

    Yeah I was gonna say this is something anyone in tech knows, spaces are a plague

    buycurious, to lemmyshitpost in She's got a bright future ahead of her... on OF

    Lady: “[What’s the difference] Between me and a mosquito?”

    Man: “I don’t know, what’s the difference between you and a mosquito?”

    Lady: “When you smack me, I don’t stop sucking.”

    For those that stay on silent/keep their volume low or off.

    TseseJuer,

    thanks hopefully I can stay on silent forever. counting on you big sis

    0x4E4F, (edited )
    @0x4E4F@sh.itjust.works avatar

    I think it’s “slap me”.

    Yeah, you’re right, it’s actually “smack”.

    superduperenigma,

    You are doing the lord’s work 🙏

    CheesyFox,

    amen

    andrew, (edited )
    @andrew@lemmy.stuart.fun avatar

    “Swat me,” I think.

    kromem, to memes in "OpenAI Staff Threaten to Quit Unless Board Resigns"

    It’s the board for the non-profit which owns and controls the LLC, and none of the board members have equity in the non-profit.

    This wasn’t a board of investors/owners like for profit boards.

    TropicalDingdong,

    I mean… what would it even mean to have equity in a non-profit?

    Non-profits are organized fundamentally differently than for profit corporations.

    If anything they should have had equity in the for-profit side of the company to ensure that their incentives were aligned, if that is even your point.

    I think it brings up a very interesting test case for how this particular kind of ownership structure can fail. In another thread, it strikes the difference between authority and power, which I think was very clearly made here.

    That all being said, it seems like things have taken a turn for the worse, and if anything, this board has set the mission of a truly open AI world even further back. There seem to be some real Luddites on the board who seem to think they’ll some how be able to cram Pandora back in the box after it has well escaped control. If anything, the should swing the gate wide and at least open source the everything else so as to prevent Microsoft from having a complete monopoly on the future of AI (how things seem to be shaping up).

    frezik,

    I’m a shareholder in a non-profit. Specifically, the Green Bay Packers. It basically means having a unique piece of team memorabilia.

    banneryear1868,

    The kind of ownership is pretty normal across a wide range of industries, a lot of hospitals in the US operate with a similar structure, NGOs and “foundations,” co-ops, independent regulators, etc. Whatever’s happening in this case is remarkable but probably not because of how the board operates in this role specifically. We have to know why they fired him to know what’s going on but that’s unlikely. It could have been completely mundane but that doesn’t matter now.

    TropicalDingdong,

    Yeah that’s what I thought. I’ve formed/ been a part of several non-profits that have looked at developing for-profit components to fund the non-profit mission.

    TurtleJoe,
    @TurtleJoe@lemmy.world avatar

    The non-profit has a corporate arm. https://lemmy.world/pictrs/image/5d516092-8a35-40c4-9626-e20e95a232e4.png take a look at that structure.

    TropicalDingdong,

    I mean, that seems like a generally fine structure.

    I think they maybe could have figured out a different path that didn’t involve MS. But otherwise, it seems fine.

    trolololol,

    I’ll ask ai to explain that diagram

    Omega_Haxors,

    As a large language model, I am incapable of explaining anything that would be of use

    mp3,
    @mp3@lemmy.ca avatar

    But ultimately this will only strenghten Microsoft’s moat on AI, which is bad for everyone.

    the_third, to piracy in Naming Torrents

    This is scene, there are standards goddammit!

    Yes, there really are.

    en.m.wikipedia.org/wiki/Standard_(warez)

    Rootiest,
    @Rootiest@lemmy.world avatar

    Standards and CONSEQUENCES

    en.wikipedia.org/wiki/Nuke_(warez)

    CorrodedCranium, to memes in Toyota Hilux is best lux
    @CorrodedCranium@leminal.space avatar

    Here’s the story about the Texas City plumber whose Toyota truck was used by ISIS for those that haven’t read it

    www.cnn.com/2015/12/14/us/…/index.html

    asbestos,
    @asbestos@lemmy.world avatar

    Holy shit thanks for the laugh

    kameecoding,

    did he win that? why didn’t he just remove the decals himself?

    bizarrocullen,

    The dealer advised him not to remove it because it might ruin the paint, and he won the lawsuit

    overat8, (edited )

    The article doesn’t mention whether or not he won the lawsuit. Where did you get the info on him winning the case?

    Edit: I found the article - He won an undisclosed sum of money

    usnews.com/…/plumber-whose-decaled-truck-went-to-…

    Conradfart,

    Almost as lazy as the guy who didn’t bother to read the article, amirite?

    kameecoding,

    think you need to edit your comment mate, “almost as lazy” as an opener only works if I had called him lazy.

    dream_weasel, (edited ) to linuxmemes in I am one of you now

    “from scratch”

    It’s like a page worth of instructions you can follow verbatim excluding bootloader and network. If you watch one video of someone doing it to fill those gaps there is nothing to it.

    Source: I watched Kai Hendry speed install arch, bookmarked the video and all my machines are now arch “from scratch” in 10 minutes or less of actual keyboard time.

    Sanyanov,

    Mental Outlaw also has the great guide explaining the install step-by-step in a great detail

    Jumuta,

    except he doesn’t talk about the difference in bootloader installation for uefi

    Sanyanov, (edited )

    Touche

    exu,

    I don’t remember the channel anymore, but there’s one guy constantly updating various setups. Like Arch with encryption, Arch with BTRFS, etc. I started with one of those videos and wrote my own step by step guide. Now I’m just following my own guide whenever I install Arch.

    victorz,

    I wouldn’t dare do that. If my own guide becomes outdated I’d have wasted time and effort. But to each their own. 👍

    kuberoot,

    I think calling it “a page worth” is understating it somewhat, especially if you want a full install to actually use stuff. In reality, when installing at first, you’ll be finding stuff you missed for a while, like hardware video decoding.

    Also, are you referring to just the direct instructions for one choice? Because to me, the point of installing manually is educating yourself on the choices, choosing one that suits you, and understanding what you’re doing to set it up. Of course, when you’re doing subsequent installs, you already know that stuff - but at that point you might just want to write an install script instead of running them manually.

    savvywolf, to linuxmemes in Year of the Diagonal Linux Desktop, y'all
    @savvywolf@pawb.social avatar

    The steam deck does have a gyroscope for sensing rotation… Just saying.

    SingularEye,

    😖

    Kolanaki,
    @Kolanaki@yiffit.net avatar

    Give me a stabilized image on a spinning display.

    runswithjedi,
    FuglyDuck,
    @FuglyDuck@lemmy.world avatar
    jimmydoreisalefty, to piracy in Naming Torrents

    I prefer dots over spaces.

    Spaces can mess with stuff, double space…

    LazaroFilm,
    @LazaroFilm@lemmy.world avatar

    I prefer &nbsp;

    SchizoDenji,

    Dots sometimes pose problems in arrs.

    Mr_Blott,

    Yeah I had dots on my arse once. Turned out I’d been sitting on my keyboard

    KrummsHairyBalls,

    I.too.prefer.dots.over.spaces.

    pete_the_cat,

    :%s/./ /g

    people,

    And get the bonus of excellent compression after that, too!

    Mr_Blott, to mildlyinteresting in A very useful guide to buying gelato from a Italian local

    Pro tip, if you’re in Europe but not in Italy, any place that calls it gelato is a tourist trap

    SpicyPeaSoup,
    @SpicyPeaSoup@kbin.social avatar

    TIL every single ice cream shop in Sicily selling ice cream at 50c a scoop is a tourist trap.

    ValiantDust,

    Last I heard Sicily was in Italy though.

    SonnyVabitch,

    Only until Sexit

    GiuseppeAndTheYeti,

    👀

    Trainguyrom,

    50¢ a scoop is pretty cheap for any kind of ice cream?

    PaulieDied,

    Just to say, Massimo Gelato in Amsterdam is very much an exception to this.

    TootSweet, to lemmyshitpost in Could we not bring that to Lemmy, please?

    Stay with me here.

    /c/pornporn, but it’s SFW.

    thorbot,

    You lost me

    rockSlayer, to lemmyshitpost in Call me an idiot, but I would die laughing even if something like this happened to me

    Just a tip, if you’re ever caught in a situation like this, don’t chase after or cling to your car, and get the fuck out of the street.

    Mamertine,

    Ugh, in the news here a few years ago, they showed a video of a lady jumping out of her car so she wouldn’t be in it when it slid into another car. The news anchor advised people to stay inside of your car. It’s a cage. You’re safer inside that cage than lying in the road.

    RegalPotoo,
    @RegalPotoo@lemmy.world avatar

    Being in the car for a low speed collision wouldn’t be fun, but it’s better than being a bonus target in the middle of a game of car billiards

    rockSlayer,

    I feel like people forget that the conditions are like that for everyone and not just themselves, so they think it’s ok to mill around the scene while waiting for emergency services. It’s a terrible idea to do so, and it’s absolutely safer in the car. If for one reason or another you have to exit the vehicle, get far away from the scene; like at least across the ditch or far into someone’s lawn

    cypherpunks, to linuxmemes in Year of the Diagonal Linux Desktop, y'all
    @cypherpunks@lemmy.ml avatar
    768, to linuxmemes in I am one of you now

    Trve Arch users don’t remember their install process.

    zurchpet,
    @zurchpet@lemmy.ml avatar

    I even ported an install once from one device to another just by copying the data and installing the bootloader.

    backhdlp,
    @backhdlp@lemmy.blahaj.zone avatar

    I only remember how long it takes

    victorz,

    Can confirm. Install once and it lives forever until the hardware dies or is replaced.

    Szymon, to lemmyshitpost in Ummm...

    My goodness, I hope that woman finds the help she needs in her life.

    ryan213,
    @ryan213@lemmy.ca avatar

    Because of her weight or what she’s saying? Or both?

    Szymon, (edited )

    There’s likely some deep rooted trauma there which would be beneficial to have some professional guidance to uncover and address through rational eyes. Our brains will create defence mechanisms to protect itself from perceived harm, but the mechanism may not be a healthy one. A professional can help sus out areas of concern for you and give you new tools for dealing with those emotions.

    Her unhealthy choices concerning social behavior and eating habits are likely symptoms of a deeper issue.

    bullshitter, (edited )

    Thanks once again kind stranger. You helped me not get angry at those bitches while also showing me the way to deal with mental problems.

    Although I should have known better to give importance to a shitpost.

    Szymon, (edited )

    Shitpost or not, there’s often an opportunity to reflect and learn. Best of luck my friend

    0x4E4F,

    I hope so as well… that wasn’t even funny…

    Patrizsche,

    Oh so you posted for its educational value?

    0x4E4F,

    Yeah, kinda…

    RavindraNemandi, to lemmyshitpost in Modern art
    @RavindraNemandi@ttrpg.network avatar

    A lot of this stuff is really cool tho. People rag on modern art because they dont understand it or because they are pushing a regressive worldview onto others. This stuff is good/important because it is weird.

    CptEnder,

    Yuh there were some real good ones in here with pretty strong messages - woman in vacuum seal.

    Also the high jump one was just cool af.

    Lucidlethargy,

    I’ve also seen the emperors clothes. They are absolutely magnificant!

    DragonTypeWyvern,

    Ngl I respect the eyelash painter regardless.

    Everyone else is just part of a money laundering scheme.

    She’s willing to suffer for the art at least.

    0x4E4F,
    @0x4E4F@sh.itjust.works avatar

    OK… each to his own I guess 🤷.

    HerbalGamer,
    @HerbalGamer@sh.itjust.works avatar

    I’m with you this shit was all weird.

    ThrowawayPermanente,

    I also thought it was brave, provocative, and transformational.

    ElderWendigo,

    And for as weird as they may seem at first blush, many of these obviously took real skill, thought, and effort to execute. Some of these would even be dangerous or deadly without that effort.

    PraiseTheSoup,

    Could you please give some timestamps for the many instances which you believe took real skill? Because I didn’t see a single one.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4198400 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 171

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 360448 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/Resources/views/logs.html.php on line 36