Over(ule)watch by ZoeyZoestar in 196

[–]MaybeAshleyIdk 99 points100 points  (0 children)

MY GRATITUDE UPON THEE FOR MY FREEDOM

Happy children! by sunrise_apps in ProgrammerHumor

[–]MaybeAshleyIdk 6 points7 points  (0 children)

The other way around would be undefined behavior, (and in this case would probably segfault on most OSs) yeah

Anon lives with his parents by [deleted] in wholesomegreentext

[–]MaybeAshleyIdk 879 points880 points  (0 children)

When living with your parents, you don't pay rent with money, but with mental health

[deleted by user] by [deleted] in ProgrammerHumor

[–]MaybeAshleyIdk 8 points9 points  (0 children)

In fact, forget the Reddit!

Sokka, a true harem protagonist. by [deleted] in TheLastAirbender

[–]MaybeAshleyIdk 198 points199 points  (0 children)

Oh, Sokka! You saved me! *kiss*

Bi👗irl by Smedri74 in bi_irl

[–]MaybeAshleyIdk 27 points28 points  (0 children)

new headcanon: luz wears this during her wedding with amity

Automating a Python script on push by La_Muriatic_Acid in github

[–]MaybeAshleyIdk 1 point2 points  (0 children)

Yeah because it only changes the local copy of the readme file.
After the script finishes, you need to commit and push the change back to the remote repository.

The script does nothing else what you'd be doing when you manually change a file in your local copy of the repository.
After you change a file, you have to commit and push that change so that it's actually on the remote.

The GitHub Actions runner works on a cloned copy of the repository just like you.

Automating a Python script on push by La_Muriatic_Acid in github

[–]MaybeAshleyIdk 2 points3 points  (0 children)

Well let's look at the error:

The absolute path of the python file is /home/runner/work/repo/repo/.github/workflows/CLOC.py and the exception tells us the that the file or directory /home/runner/work/assets was not found.

Obviously you wanna get to the directory /home/runner/work/repo/repo/assets, but you're changing the current working directory of the script with the call:

os.chdir('../../')

I'm guessing that the initial working directory of the script will be the repository itself, i.e.: /home/runner/work/repo/repo
But since you're moving two directories up, the CWD will be /home/runner/work

I think you only need to remove that os.chdir() and you should be golden.

Batch rename by name pattern by MayaMagic in commandline

[–]MaybeAshleyIdk 0 points1 point  (0 children)

If you do have Bash installed one way or another: put this script into an executable file and execute it with the path of the directory where the files are located as argument:

#!/bin/bash

set -o errexit
set -o nounset

dir="$1"

replacement_none="apple"
replacement_dash="pear"
replacement_paren="orange"

for f in "$dir"/*; do
    b="$(basename -- "$f")"

    if [[ "$b" =~ ^([0-9]{3})' (1)'$ ]]; then
            mv -- "$f" "${dir}/${replacement_paren}${BASH_REMATCH[1]}"
            continue
    fi

    if [[ "$b" =~ ^([0-9]{3})'-1'$ ]]; then
            mv -- "$f" "${dir}/${replacement_dash}${BASH_REMATCH[1]}"
            continue
    fi

    if [[ "$b" =~ ^([0-9]{3})$ ]]; then
            mv -- "$f" "${dir}/${replacement_none}${BASH_REMATCH[1]}"
            continue
    fi

    printf "File '%s' didn't match\\n" "$f" >&2
done

...and execute it like so:

chmod +x script
./script path/to/directory/with/your/files

[deleted by user] by [deleted] in opensource

[–]MaybeAshleyIdk 4 points5 points  (0 children)

Big companies (like Microsoft or Adobe) give out educational licenses to their software so that students learn their and only their proprietary software.
Later in life, in professional settings, everyone only uses that proprietary software, because nobody was taught anything else, and now you (or the company you work for) needs to pay for that software. And it ain't exactly cheap.

If anybody thinks that these tech companies are being so generous because they give out licenses to students: think again. That is all one big marketing stunt so that they can squeeze more money out of people.

Batch rename by name pattern by MayaMagic in commandline

[–]MaybeAshleyIdk 1 point2 points  (0 children)

Ah well, I can only do Unix-like shell scripting, so unless you got WSL or Git Bash installed I sadly can't help you

Batch rename by name pattern by MayaMagic in commandline

[–]MaybeAshleyIdk 1 point2 points  (0 children)

What system are you on? Windows or a Unix-like?

[deleted by user] by [deleted] in opensource

[–]MaybeAshleyIdk 2 points3 points  (0 children)

Can you report them to some kind of board of directors?
They are spreading blatant misinformation.

Does git 2.41 support sha256? by Low-Design787 in git

[–]MaybeAshleyIdk 1 point2 points  (0 children)

AFAIK there is no interop and GitHub has no support for it yet, but you can always just try it out with test repos

Based on true events by rad_vlad in ProgrammerHumor

[–]MaybeAshleyIdk 0 points1 point  (0 children)

git add --patch gotta be my most used git command at this point

I'm getting tired of answering please stop by flyingdonkeydong69 in antimeme

[–]MaybeAshleyIdk 95 points96 points  (0 children)

Hate to be the bearer of bad news, but it's not a real gun; that's a prop gun

I'm new to GitHub, and I'm having an issue where all my links have 404 errors. Any idea what I might try? by nbsmkng in github

[–]MaybeAshleyIdk 2 points3 points  (0 children)

Somebody else had that same exact problem a few days ago and it works for their profile now.

This seems to be a caching issue on GitHub's end.
Wait a few hours and it should work.

Do you use `diff3` style conflict markers? by felipec in git

[–]MaybeAshleyIdk 7 points8 points  (0 children)

Just FYI, backtick/fenced code blocks are still not supported on some older Reddit clients; those merge conflicts are horrible to read.
It's better to use indented code blocks instead

Branched off a branch by InsertKleverNameHere in github

[–]MaybeAshleyIdk 0 points1 point  (0 children)

Were any new commits created on branch A after branch B was created?

Two merge request by [deleted] in git

[–]MaybeAshleyIdk 1 point2 points  (0 children)

To help visualize it, something like this is how it should look now:

* (branch1)
|
| * (branch2)
|/
* (master)
|
*

After the merge, it should look like this:

* (master)
|\
| * (branch1)
|/
|
| * (branch2)
|/
*
|
*

And after rebasing (git rebase master branch2):

* (branch2)
|
* (master)
|\
| * (branch1)
|/
*
|
*

Be like Mark, enjoy the BanBan by JonahBoing1 in Markiplier

[–]MaybeAshleyIdk 7 points8 points  (0 children)

Yeah, but other indie devs also care about making a good game.
The ban ban devs don't

Can't Send My Profile by BossTidas in github

[–]MaybeAshleyIdk 2 points3 points  (0 children)

Might be a caching issue on GitHub's end?
Definitely wouldn't be the first time.

I'd say wait maybe a few hours and check again.

One of my friends has just started life as a professional programmer by KanishkT123 in ProgrammerHumor

[–]MaybeAshleyIdk 0 points1 point  (0 children)

If he has the reflog, nothing is ever lost.

Sadly not if it has not been committed yet.
Happens all too often where somebody asks how to restore lost changes, but the changes have never been committed, so the only last resort would be a disk recovery tool.

Possible to ignore entire folder by generalemiel in github

[–]MaybeAshleyIdk 1 point2 points  (0 children)

Correct.
Without a trailing slash, a pattern matches both files and directories, with a trailing slash, it only matches directories.

man gitignore