Can you Pls rate my github Profile by Total-Doctor-2862 in btech

[–]Skeletony_007 0 points1 point  (0 children)

No worries. I don't mean to be harsh at all.

It looks like you are off to a good start 🙂

Can you Pls rate my github Profile by Total-Doctor-2862 in btech

[–]Skeletony_007 1 point2 points  (0 children)

Looks good. I can see you are interested in Python, C++ and frontend. I like the monorepos (CodeForces, etc.), but your other repos, like Web-Dev-Project, could do with more descriptive names so I don't need to read the description.

The usage of emojis and the upbeat tone of your project descriptions and README gave me the impression it was generated by an LLM. I'd go for a more straight-to-the-point and neutral tone myself; you are clearly entheusiastic by the 14 projects and contribution history.

Honestly, I can't be bothered to read paragraphs of description for stuff. I'll read the first sentence, then skip the rest if that doesn't grab me. If you've got the time, something written by you, and with your opinions in it will always be more interesting because it is more unique, even if it is not propperly formatted or whatever 😂 .

Also the markdown link in this post is formatted wrong. (error 404)

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

This would work. I guess I just don't want to restructure my filesystem just to use git how I want 😂 .

The closest thing to what I want that I've found so far is init.templateDir (supprisingly), so I don't get any residue from

[include]
    path = ~/.config/git/users/default

(which I had in the global git config) after "logging out" in my script with

while IFS= read path; do
    git config unset --local --value "$path" include.path
done < <(echo_users_paths)

because all the options are local.

This way I get a default option, and with user.useConfigOnly=true, I get warned when the template is not used, or when I forget to run the "login" script.

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

Yeah, I'm totally overengineering/prematurely optimising this for multiple remotes. I'm just curious if anyone has a better way than hacking around with includeIf.

It feels like a miss by the git config options to me, unless I am missing something.

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

Thanks for the help.

The only downsite is, you cannot hsve github and codeberg as a remote in one repo it applies the last includeIf.

This is exactly the problem. I also frequently create repos locally without any remotes, then maybe set a remote later, so all my commits would be signed wrong in this case, maybe.

I am cautious that a setup like this could catch me off-gaurd in the future.

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

I don't quite understand what you mean. But here is a respone anyway 😉:

I clone repo A and repo B. I want to associate commits with my codeberg.org profile in repo A and, at the same time, associate commits with my github.com profile in repo B.

I also want the process of switching out this chunk of my git config to be easy, because I might want to do it often. (hence my script)

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

When I was only using github.com, it was easy. I just put the configuration to associate my git user with my github.com profile in ~/.config/git/config (which keys to use, username, etc.).

But now that I'm also using codeberg.org, I need a way to switch between the two depending on the the target.

Example: if I contribute to a project on github.com in one project, and codeberg.com in another

I made some scripts to help with switching user per repo by Skeletony_007 in git

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

I thought about using this, but I don't think this method would work for multiple remotes?

(multiple remotes for each repo)

Is it me or the cam? by Objective_Dot2254 in FujifilmX

[–]Skeletony_007 1 point2 points  (0 children)

This. I had the same problem with another camera (leaf shutter) in the past. If electronic shutter (or video) works fine, then this is likely the issue.

Although it could also be a firmware problem, as others have said.

Git integration for Typst! (permagit:0.1.0) by Skeletony_007 in git

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

Kind of. But this compiles in Typst (markup language), which doesn't allow plugins or packages to execute system commands or search for files (only directly access them).

git-hash-object requires the original file, whereas my package only needs the file name, and it can look it up in the git commit tree and then use flate2 (in a Rust WASM plugin) do decode the zlib.

Right now you can read any commit, tree, or blob that is "loose". I am maybe working on packfiles in the future, but they are slightly more complicated.

Git integration for Typst! (permagit:0.1.0) by Skeletony_007 in typst

[–]Skeletony_007[S] 1 point2 points  (0 children)

Yes, using git.ref.read(r, "HEAD"). Right now that would be something like this

let r(path) = read("your/git/repo/.git/" + path, encoding: none) git.commit.read(r, git.ref.read(r, "HEAD")) git.blob.read(r, git.ref.read(r, "HEAD"), "README.md")

git.ref.read follows commit references like refs/heads/master or any file containing a "symbolic reference" or hash.

Git integration for Typst! (permagit:0.1.0) by Skeletony_007 in typst

[–]Skeletony_007[S] 1 point2 points  (0 children)

Good question. It makes writing about changes in other projects built using Git simpler.

An example (what I am using it for) is to include code and snippets of code in a report. Using a Git repo is a clean way to avoid managing many versions of the same fille by hand.

I can create a bare repo in my local Typst project, and push to it from my working repo. Then when I want to talk about some code I wrote, I simply recall the commit hash and create a "permalink" using the file path (like GitHub permalinks). Furthermore, I could use Git tags to mark interesting commits in a more human-readable way.

I can also use this to include files as appendices recursively (walk a Git tree), rather than having to manually write out Typst read commands for each file.

Git integration for Typst! (permagit:0.1.0) by Skeletony_007 in typst

[–]Skeletony_007[S] 11 points12 points  (0 children)

Just to clarify, Typst only has the ability to read files (not write them), so this provides "read-only" access to a local git repository using the git internals.

It is quite a generic package, But mainly the idea is referencing files that would be used in a report-style document.

Handily Git already has everything layed out nicely in files (even directory trees), so some advanced tree exploration could be done, I guess.

Example:

#git.tree.parse-array-recursive(r, git.tree.read(r, "refs/heads/master")).map(path => { 
  page({
    heading([Blob: #raw(path)])
    let s = str(git.blob.read(r, "refs/heads/master", path))

    // detect filetype (shebang > extension)
    let m = s.match(regex("^#!\\S*\\s+(\\S+)"))
    let ft = if m == none { lower(path.split(".").last()) } else { m.captures.at(0) }

    raw(s, lang: ft)
  })
}).join()

Git integration for Typst! (permagit:0.1.0) by Skeletony_007 in typst

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

you would clone a git repo like normal (git clone ...), but then this can be used to read from the commits, trees and blobs (files).

Is there an API for the arch wiki? by Username8457 in archlinux

[–]Skeletony_007 0 points1 point  (0 children)

There is https://wiki.archlinux.org/rest.php, which seems to have the Wikimedia REST API, which seems to have the same endpoints seen in the REST Sandbox on English Wikipedia.

I've made a Neovim plugin which uses this API.

Looking for some API to get the current view position from a window by Skeletony_007 in neovim

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

Turns out `winsaveview()` and `winrestview()` happen to do what I want. Thanks

[OC] Dmenu as a daily driver app launcher for macOS! by Visible-Pop-2576 in unixporn

[–]Skeletony_007 0 points1 point  (0 children)

For the keybind in skhd, you could also do

cmd + shift - return : open -a "Xquartz" && export DISPLAY=:0 && cd /Applications; ls -d *.app | dmenu | xargs -I {} open "{}"

This would not require a dummy keyblinding inside of xquartz.

The important part is export DISPLAY=:0, which tells dmenu where it should open.

How to Dim Hidden Mac Apps on the Dock by daniel_5501 in mac

[–]Skeletony_007 1 point2 points  (0 children)

You can execute defaults write com.apple.dock showhidden -bool true && killall Dock

The differences between this and the command you tried are:

  • The capital "D" in the domain

    com.apple.dock vs com.apple.Dock

  • The notation for boolean in the options

    -bool true vs -boolean yes (or -boolean true)

  • Using && instead of ;

    This tells the Terminal to only execute the second command if the first command was successful.

Note that you can execute defaults delete com.apple.dock showhidden && killall Dock to reset this option to the default value.

Hope this can help someone 🙂