
u/PrestigiousZombie531

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?
This is how you slap s sepoy on the face without slapping
reddit.comDay 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
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
If you ever feel stupid in life, dont forget John Hodge
reddit.comList 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
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 :)
Gentle reminder that you dont get banned on this sub for saying "Ubisoft great"!
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..
can't play games I physically bought anymore because they said so
i just wanted to enjoy some games of my youth once again 👍
If Ubisoft developed Gta 6 lol
'india trash sirrr, worst country sirrrrr', 'china developed but our people are trash and cant sirrrrr' (/s)
wheres the sepoys?
Lambert: "I hate this kinda thing...", me: "I love this kinda thing..." also what is that dude doing?
Get your Windows license refund now!
I modified the tsconfig.json generated by AWS CDK, can you spot something wrong?
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/**/*"
]
}
Is this line actually a race condition? If yes, what would be a way to write it better?
- 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)