▲ 4 r/bash

One of the big things that bugs me in bash is how to write those boolean check_, exists_ type of functions, any standard practices?

#!/usr/bin/env bash

function is_existing_docker_network() {
	local -r debug="${1:-false}"
	local -r network_name="$2"

	if docker network inspect "${network_name}" >/dev/null 2>&1; then
	[[ "${debug}" = "true" ]] && log_warn "docker network ${network_name} already exists"
		return 1
	else
		return 0
	fi
}

function create_docker_network() {
	local -r debug="${1:-false}"
	local -r network_name="$2"

	[[ "${debug}" = "true" ]] && log_info "creating docker network ${network_name}..."

	if docker network create "${network_name}"; then
		[[ "${debug}" = "true" ]] && log_info "docker network ${network_name} creation completed"
		return 0
	else
		log_error "docker network ${network_name} creation failed"
		return 1
	fi
}
  • Look at the create_docker_network function above
  • I want to create a network only if it doesnt already exist
  • In a normal programming language you would simply return a true or false from the is_existing_docker_network function above
  • How do you go about do this kinda thing in bash? Should I actually return 1 if a network exists? Isnt that an error condition?
reddit.com
u/PrestigiousZombie531 — 29 days ago

Day 2 of seeking 4 players for Blacklist PC COOP on Charlie missions wave 16+ Ghost Perfectionist

OK I am gonna tone it down a bit after today I ll post only on weekends, so that it doesnt look like I am spamming the sub daily

Do the servers work?

Yes blacklist has private servers

What 4 player COOP?

Yes there is a mod for playing 4 player coop in blacklist

Why?

  • Ghost perfectionist wave 16+ Charlie missions is no joke
  • Solo ll take a whole day
  • Coop will still take 3+ hours to pull this off
  • But if we can get a squad of 4 really good splinter cell type players that are slow and deadly, can be done effortless in 1 hour
  • Simple rules! dont get spotted
  • hand to hand non lethal takedowns only

Where?

When?

  • Weekends 4pm to 7 pm GMT
  • Take your clock time and convert it to the above one
  • if you are free at this time, hit me up
reddit.com
u/PrestigiousZombie531 — 1 month ago

Day 1 of seeking 4 players for Splinter Cell Blacklist Charlie Missions on COOP PC

Wait servers work?

Yes we got private servers now for PC

4 player coop WTF?

Yes the private server has a mod for 2+ players on PC

When?

weekends 4 pm tp 7pm GMT via discord

Style

  • same style by all players either ghost or panther or assault. obviously ghost is preferred

I am gonna post this daily or atleast weekly till the end of the year and see if we can rally enough people for this stuff

u/PrestigiousZombie531 — 1 month ago

List of all the crazy SplinterCelly stuff aka runs I have posted on this sub previously

Not boasting or anything but some of them are atleast a few years old so I thought I'd jog people's memory. Before I posted these, peope thought these were impossible simply because nobody else thought lets give this a try...

So here we go in no particular order

50 seconds to take out grinko on the hardest difficulty, no detection and no shooting

Entered third echelon on full stealth realistic with 0 gadgets and 0 enemies shot and yes no mark and executes SC Conviction

Took out third echelon splinter cells hand to hand combat no detection and no shooting SC Conviction

Secret route Kalinatek building route SC SAR

CLearing all enemies on Whitebox labs without shooting them and without them seeing me and obviously no gadgets

Killed emile, moss and all his cronies in SHanghai with just a knife SCDA

100% super stealthy entrance kalinatek building, no shots fired

hacked a computer at police station with the guy sitting right beside me police station SC SAR

Sneaking right between splinter cells at the white house SC Conviction

Rescuing hostage at michigan without shooting enemies or mark executes SC Conviction

Making a complete mockery of elite soldiers at presidential palace SC SAR

Doding splinter cells at full stealth white house 0 bullets fired SC COnviction

Sneaking inside beginning of Michigan Ave Reservoir, 0 bullets fired as usual SC Conviction

hacking a computer in abbatoir while standing right in front of the guard no detection SC SAR

Sparing the guy inside the toilet kalinatek building SC SAR

Ghosting entrance of airfield SC Conviction

Brought 5 player coop on full ghost to swiss embassy SC Blacklist

There are many more but I am getting a bit tired of typing now :)

reddit.com
u/PrestigiousZombie531 — 1 month ago
▲ 546 r/fuckubisoft+1 crossposts

Reason why piracy exists

Whenever I try to play wildlands, ubisoft connect makes you wanna cry.. meanwhile It's been ages when I last logged in to steam..

u/PrestigiousZombie531 — 2 months ago
▲ 3.5k r/PhysicalGames+3 crossposts

can't play games I physically bought anymore because they said so

i just wanted to enjoy some games of my youth once again 👍

u/Bebaal — 2 months ago
▲ 0 r/node

I modified the tsconfig.json generated by AWS CDK, can you spot something wrong?

https://preview.redd.it/fldj2p0j24mh1.png?width=2120&format=png&auto=webp&s=7c1b64239280443078ea49e741b9c4a2dffc13c9

tsconfig.json generated by AWS CDK

{
  "compilerOptions": {
    "alwaysStrict": true,
    "declaration": true,
    "experimentalDecorators": true,
    "inlineSourceMap": true,
    "inlineSources": true,
    "isolatedModules": true,
    "lib": [
      "es2022"
    ],
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "noEmit": true,
    "noFallthroughCasesInSwitch": false,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "skipLibCheck": true,
    "strict": true,
    "strictNullChecks": true,
    "strictPropertyInitialization": false,
    "target": "ES2022",
    "typeRoots": [
      "./node_modules/@types"
    ],
    "types": [
      "node"
    ]
  },
  "exclude": [
    "node_modules",
    "cdk.out"
  ]
}

tsconfig.json generated by me for node:22.12.0-bookworm-slim

{
  "compilerOptions": {
    "allowJs": true,
    "declaration": true,
    "experimentalDecorators": true,
    "noFallthroughCasesInSwitch": false,
    "noImplicitReturns": true,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "outDir": "dist",
    "rootDir": "./",
    "sourceMap": true,
    "strictPropertyInitialization": false
  },
  "exclude": [
    "dist",
    "cdk.out",
    "node_modules"
  ],
  "extends": "@tsconfig/node22/tsconfig.json",
  "include": [
    "src/**/*"
  ]
}
reddit.com
u/PrestigiousZombie531 — 2 months ago
▲ 13 r/bash

Is this line actually a race condition? If yes, what would be a way to write it better?

https://preview.redd.it/y8zp0vzjxvlh1.png?width=1468&format=png&auto=webp&s=f41a887e05d48b7bb79b4bad610d84b707edd397

- yea well claude says this could be a race condition

- now obviously i am not familiar with how async stuff works in bash

- so i thought i would ask the experts here

EDIT 1

exec 2> >(tee -a "${error_log_path}" >&2)exec 2> >(tee -a "${error_log_path}" >&2)

Even this medium post seems to use it

reddit.com
u/PrestigiousZombie531 — 2 months ago
▲ 101 r/fuckubisoft+1 crossposts

Why put effort in splinter cell when you can recycle the same game for the 3rd time and make twice as much money

u/PrestigiousZombie531 — 2 months ago