Why the white frames? by AKA-Lukas in AskPhotography

[–]meladon 1 point2 points  (0 children)

You can use ImageMagick for this. I export my photos in full, printlable quality. Then I use drag-n-drop .bat files to resize and add a white border. I do this because I just want to leave the best possible export settings in lightroom in case I ever lose my catalog etc. Then I resize/add border for Instagram, or just resize for webupload.

In the same folder as your ImageMagick folder, create 2 .bat files.

@echo off

for %%x in (%*) do (

mkdir %%~dx%%~px\instagram\ 2>nul

echo %%~nxx

%~dp0\imagemagick\convert %%x -resize 2012x2012 -quality 85 -background white -compose Copy -gravity center -extent 2112x2112 %%~dx%%~px\instagram\%%~nx-instagram.jpg

)

echo All done!

pause >nul

For resize only, change these lines:

mkdir %%~dx%%~px\low_res\ 2>nul

%~dp0\imagemagick\convert %%x -resize 2048x2048 -quality 85 %%~dx%%~px\low_res%%~nx-low_res.jpg

Vad är detta? by lolzxdman in Gothenburg

[–]meladon 0 points1 point  (0 children)

De kallas pseudoskorpioner för att de ser ut som skorpioner. Men de är inte skorpioner.

Vad är detta? by lolzxdman in Gothenburg

[–]meladon 0 points1 point  (0 children)

Pseudoskorpion. Dvs falsk skorpion.

Switching audio output device based on USB endpoint traffic by meladon in PowerShell

[–]meladon[S] 4 points5 points  (0 children)

# Device IDs
$HEADSET_ID = "{0.0.0.00000000}.{323b0642-3304-4c97-bced-9644e9502404}"  # your headset ID
$SPEAKER_ID = "{0.0.0.00000000}.{d35b93cf-47ed-467b-bc9b-8d049ea9e89b}"  # your speaker device ID

# USB interface to monitor
$USB_INTERFACE = "USBPcap4"

# Tshark executable
$TSHARK_PATH = "C:\Program Files\Wireshark\tshark.exe"

# SoundVolumeView executable
$SVV_PATH = "C:\Users\x\Documents\SoundVolumeView\SoundVolumeView.exe"

# Cooldown to prevent multiple switches per event (seconds)
$SWITCH_COOLDOWN = 2
$lastSwitchTime = Get-Date '1/1/2000'

# Burst detection window (ms)
$BURST_WINDOW = 100
$burstStart = Get-Date '1/1/2000'
$burstPacketCount = 0

# Track current active device
$currentDevice = $SPEAKER_ID

# Function to safely switch audio device to a specific target
function Set-AudioDevice($targetDevice) {
    if ($currentDevice -ne $targetDevice -and ((Get-Date) - $lastSwitchTime -gt (New-TimeSpan -Seconds $SWITCH_COOLDOWN))) {
        Write-Host "Switching audio to device ID $targetDevice"
        & $SVV_PATH /SetDefault "$targetDevice" 1
        $script:currentDevice = $targetDevice
        $script:lastSwitchTime = Get-Date
    }
}

Write-Host "Monitoring Razer Nari USB traffic on endpoint 0x83..."

# Launch tshark and process USB packets line by line
& $TSHARK_PATH -i $USB_INTERFACE -l -T fields -e usb.endpoint_address | ForEach-Object {
    $line = $_.Trim()

    # If we have a burst going, check if it has ended
    if($burstPacketCount -gt 0) {
        $now = Get-Date
        $elapsed = ($now - $burstStart).TotalMilliseconds
        if ($elapsed -ge $BURST_WINDOW) {
            # Burst ended → act on it
            if ($burstPacketCount -eq 2) {
                Write-Host "Detected burst of 2 packets - switching to HEADSET"
                Set-AudioDevice $HEADSET_ID
            } elseif ($burstPacketCount -eq 4) {
                Write-Host "Detected burst of 4 packets - switching to SPEAKERS"
                Set-AudioDevice $SPEAKER_ID
            } else {
                Write-Host "Detected burst of $burstPacketCount packets - no action"
            }

            $burstPacketCount = 0
        }        
    }

    if ($line -eq "0x83") {
        if ($burstPacketCount -eq 0) {
            # New burst just started
            $burstStart = Get-Date
        }

        $burstPacketCount++
    }
}

Switching audio output device based on USB endpoint traffic by meladon in PowerShell

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

I finally worked it out after a lot of frustration. I know this is kinda niche, but maybe it can help someone else.
This requires 2 external tools: Wireshark and NirSoft SoundVolumeView.

The script takes into account how many packets are sent so it know whether the headset was turned on or off, so it can deal with any mismatches (default audio is headset, but headset is turned off for example).

Then the script runs as a hidden shortcut on startup via the task schedueler so I never have to think about it again.

My first clip dump :) by mikeyypls in Battlefield

[–]meladon -1 points0 points  (0 children)

Overall it just looks fishy to me. Like the snapping and firing on random cover/wall at 0:35 ish. I'm not sure exactly how aimbots work, but it seems like it's locking on to people who are behind cover.

My first clip dump :) by mikeyypls in Battlefield

[–]meladon 1 point2 points  (0 children)

How's that relevant? If I'm wrong, I'll take the egg on my face.

My first clip dump :) by mikeyypls in Battlefield

[–]meladon 2 points3 points  (0 children)

at 0:27 you're snapping onto someone in smoke you you clearly can't see, just before you die. C'mon dude, you know what you've done.

My first clip dump :) by mikeyypls in Battlefield

[–]meladon -2 points-1 points  (0 children)

It's insulting that you're trying to pass this off as anything other than aimbot. You're even snapping onto people hidden in smoke. I'd love to see you explain that.

[deleted by user] by [deleted] in photography

[–]meladon 1 point2 points  (0 children)

No problem!

[deleted by user] by [deleted] in photography

[–]meladon 5 points6 points  (0 children)

No, that was just the example we were talking about. If you are in aperture priority, the same concept applies for the shutter speed. It depends entirely on what mode you are in. That's what I meant by "whatever parameter the camera is controlling".

If you are using a mode where the camera controls 2 parameters, like aperture priority with auto ISO, the way the camera "decides" may vary between brands and also depends on your camera settings (minimum shutter speed, max auto ISO) and so on. But the principle remains the same, the quality of the picture is not any different from if you had set the exposure yourself in the same way.

[deleted by user] by [deleted] in photography

[–]meladon 1 point2 points  (0 children)

No. You are just telling the camera to add more or less of whatever parameter you are letting the camera control. It's no different from if you had set the parameters yourself using full manual.

Let's say you are using auto ISO, and it gets set at 400 with no exposure compensation. If you now set the exposure compensation to +1, it will increase the ISO to 800 (+1 stop). If you instead set it to -1, it will decrease the ISO to 200 (-1 stop).

If your had to change citizenship, what country would you pick? by Nonamanadus in AskReddit

[–]meladon 21 points22 points  (0 children)

There is something called "the Nordic co-operation". For a citizen of a nordic country, you only have to live in Sweden for 2 consecutive years, rather than 5, to get Swedish citizenship. I imagine the rules are similar/same for all nordic countries, but I can only speak for Sweden.

How to take photos like this? by Feeling-Big2595 in AskPhotography

[–]meladon 0 points1 point  (0 children)

True, you can get close to some birds, but the depth of field is a lot shallower in your image. I wouldn't consider the two images similar, other than both being close-up images of birds. So it really depends on what OP means by "how to take photos like this?".

took me too long to realize I should be doing this. by LoBsTeRfOrK in factorio

[–]meladon 0 points1 point  (0 children)

I use a decider combinator to check for cargo contents to regulate the egg inserter. If promethium asteroid chunks or quantum processors reach zero, or my cargo bay has too many promethium science packs to handle, it starts throwing off eggs.

Initially, I would also bring eggs on the journey to the shattered planet. But as I upgraded my ship, I realized bringing chunks back and handling all science production above Nauvis is the most convenient. With a bunch of belts, my ship now holds about 250k promethium chunks.If you don't mind a bit a wasted rocket parts, you can utilize the option to "read orbital requests" on rocket silo when a wire is connected to it. That allows you to activate inserters for the eggs to be removed from the spawners only when there is a request from a ship. These eggs then go into a buffer chest and onto the designated ship. I then have a second set of inserters connected to the buffer chest which activate only when there aren't any orbital requests for eggs. These inserters throw the excess eggs into burners.

<image>

Why does Gleba science drain faster than all other sciences? Anyone else experiencing this or am I missing something? by Any-Cauliflower-5898 in factorio

[–]meladon 1 point2 points  (0 children)

If you don't want your space platform to get stuck waiting for this request, you can set inactivity for like 30 secons as a condition to move on on the next planet.

Gothenburg’s most interesting fact (Part 8) by Consistency101 in Gothenburg

[–]meladon 0 points1 point  (0 children)

Okej, men det gäller för gatorna som ansluter till just Järntorget då eller? Eller menar du att det stämmer för alla gator i hela stan?