xtapa

joined 1 year ago
[–] [email protected] 18 points 1 week ago (2 children)

Tut mir leid, Japan-Fanboys und -Girls.

Tabi (jap. 足袋) sind eine Art von knöchelhohen japanischen Socken mit abgeteiltem großem Zeh.

Sie werden üblicherweise zu Zōri oder Geta (beides Sandalen) getragen.

Quelle: Wikipedia

Tabi (Socken) 足袋 Traditionelle Socken bestehen meist aus weißem, festem Baumwollstoff mit abgeteiltem großen Zeh.

Zôri 草履 (Sandalen) Zôri-Sandalen gehören zum Kimono

Quelle: Deutsch-Japanische Gesellschaft München

Es SIND Socken in Sandalen.

[–] [email protected] 2 points 1 week ago

Hersteller sprechen von Temposchwelle.

[–] [email protected] 2 points 1 week ago* (last edited 1 week ago)

I personally try to avoid deeply nested if/else. Or else in general, because I think it makes code more readable. Especially when one of the branches is just an exit condition.

if exitCondition {
    return false
}
// long ass code execution

is way more readable than

if !exitCondition {
    // long ass code execution
} else {
   return false
}

In a loop, you can just return the value instead of passing it to a "retVal" variable.

With those in mind, you could refactor HasPermissions to

func (r *RBAC) HasPermission(assignedRoles []string, requiredPermission string, visited map[string]bool) bool {
	for _, assigned := range assignedRoles {
		if visited[assigned] {
			continue
		}
		role, ok := r.Roles[assigned]
		if !ok {
			//role does not exist, so skip it
			continue
		}
		for _, permission := range role.Permissions {
			if permission.String() == requiredPermission {
				//Permission has been found! Set permitted to true and bust out of the loop
				return true
			}
		}
		//check inherited roles
		if permitted := r.HasPermission(role.Inherits, requiredPermission, visited); permitted {
			return true
		}
	}
	return false
}

The same could be applied to LoadJSONFile and I think that really would approve the readability and maintainability of your code.

edit: This refactor is not tested

[–] [email protected] 5 points 2 weeks ago

Your "statistics" are fantasy numbers, not statistics. And statistics or probabilities, no matter how low or high, are not proof.

[–] [email protected] 5 points 1 month ago

Habe von AfD nichts weiter erwartet.

[–] [email protected] 6 points 2 months ago

Add Shape shifting and you're Ranma.

[–] [email protected] 4 points 2 months ago (1 children)

I like the question.

I had to think of two songs immediately:

Coldplay - Magic. I really feel the lyrics but the "of course I do" at the end always leaves me in tears.

Daft Punk - Touch. I always interpret the song as a robot struggling to become sentient, but it also reminds me of my process of leaving behind my angry and frustrated teen and early twenties self because I realized that it made me unhappy.

[–] [email protected] 1 points 2 months ago

The firmware update did it :)

[–] [email protected] 3 points 2 months ago (2 children)

That wouldn't exclude Cyberpunk for example.

[–] [email protected] 2 points 2 months ago (1 children)

Oh, updating firmware sounds reasonable. Thanks!

 

cross-posted from: https://discuss.tchncs.de/post/27742447

Hi folks,

I got a new Xbox Series X Controller (Model 1914). I had Xbox One controller before.

With xpadneo installed I had basically no problems running my xbox one controller. It connected via BT with no issues and workes in games really well wired and wireless.

The new controller on the other hand, works really well via cable, but does not connect via BT. I can find it, I can pair it, but I cannot connect to it.

xpadneo readme says Series X needs a BT stick with BLE so I bought one, but that did not solve the problem (I'm not sure if BLE needs to be activated or how to do it rn).

 

Hi folks,

I got a new Xbox Series X Controller (Model 1914). I had Xbox One controller before.

With xpadneo installed I had basically no problems running my xbox one controller. It connected via BT with no issues and workes in games really well wired and wireless.

The new controller on the other hand, works really well via cable, but does not connect via BT. I can find it, I can pair it, but I cannot connect to it.

xpadneo readme says Series X needs a BT stick with BLE so I bought one, but that did not solve the problem (I'm not sure if BLE needs to be activated or how to do it rn).

317
Pro Linux hacking (discuss.tchncs.de)
 

Found some very special "make it look hacky" bash in criminal minds.

 

cross-posted from: https://discuss.tchncs.de/post/20478370

cross-posted from: https://discuss.tchncs.de/post/20474285

I've been trying tmux and followed a video that showcases and offers a prebuilt config for styling and plugins. Something happended (guess I did something wrong?) the styling broke and I decided I'll go bare bones and customize to my needs when needed instead of using preconfigured stuff. I deleted all configs and caches I could find with fzf and even reinstalled tmux, but still some broken styling is present and makes it unpleasent to work with. Some of my configs seem to be present even after uninstall, as the prefix is still C-Space instead of the default. There are some oh-my-zsh subfolders that contain tmux. I don't know if those have been there before and I also don't know, if I can delete them without breaking the next thing.

I'm on a MacBook and installed tmux via brew.

 

I've been trying tmux and followed a video that showcases and offers a prebuilt config for styling and plugins. Something happended (guess I did something wrong?) the styling broke and I decided I'll go bare bones and customize to my needs when needed instead of using preconfigured stuff. I deleted all configs and caches I could find with fzf and even reinstalled tmux, but still some broken styling is present and makes it unpleasent to work with. Some of my configs seem to be present even after uninstall, as the prefix is still C-Space instead of the default. There are some oh-my-zsh subfolders that contain tmux. I don't know if those have been there before and I also don't know, if I can delete them without breaking the next thing.

I'm on a MacBook and installed tmux via brew.

 

Hi, I just started using Logseq via the Mac desktop app. My Mouse is a Logi M720 Triathlon with thumb buttons set to default settings with Forward (Forward button) and Back (Back button). Those work just fine everywhere. IDEs, text editors, Obsidian, browsers etc. But in Logseq, the buttons do nothing and it kinda breaks my flow because I have to switch to keyboard for weird shortcuts or have to klick the back button manually. Is there a way ti fix this? I could not find a working fix yet.

8
Uninstall iterm2 for good (discuss.tchncs.de)
submitted 1 year ago* (last edited 11 months ago) by [email protected] to c/[email protected]
 

Hi,

I'm trying to uninstall iterm2. I installed it via the installer from their webpage and tried to uninstall it by putting the application in the bin as usual. But it keeps reappearing. I also tried removing remaining files: "~/Library/Application Support/iTerm", "~/Library/Application Support/iTerm2", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.googlecode.iterm2.sfl*", "~/Library/Caches/com.googlecode.iterm2", "~/Library/Cookies/com.googlecode.iterm2.binarycookies", "~/Library/Preferences/com.googlecode.iterm2.plist", "~/Library/Saved Application State/com.googlecode.iterm2.savedState",

Still, iterm will pop up as soon as I start my mac. What is this shit? How can I get rid of it?

Answer: "This shit" is my stupid brain. I forgot I reinstalled iterm after my employer introduced a managed software center. It was the only app I installed via msc myself and thus did not think of it at first.

 

Hi,

I'm in the weird spot again, where I want to update my Tumbleweed system and am lost in a dependency hell. It more or less occurs once in a while when updates drop and the prompt asks if I want to install stuff from vendor "obs://build.opensuse.org/home:wolfi323" replacing the obsolete stuff from the official openSUSE vendor.

As soon as I read wolfi323, I get fucking Vietnam flashbacks, because it means I will have to decide for ~100 services if I keep the current obsolote version or install the one from wolfi323. Either way, it's gonna fuck up a myriad of dependencies.

All that hassle just to do the same shit all over again because at some point, the official opensuse repos catch up with newer versions.

I could probably wait for the official updates, but it's uncertain, when they are going to drop and I'll just pile up thousands of updates in the meantime.

How do the Tumbleweed Folks among us deal with this?

 

Hello, I just startet up my PC and Latte-Dock seems to be gone, not only my local installation, but also the package from zypper. Does someone know whats happening here?

 

I just noticed, that my SSD is almost full and I think it is because of all the zypper packages I got installed. I've got another ~100gb SSD thats just for stuff (mounted unter "Misc" says it all) and would like to move some (or all?) of the packages like vscode, podman or other stuff on that second SSD. Is there a way to do that with zypper without removing and installing them again under the new path?

view more: next ›