Search This Blog

Saturday, August 3, 2024

Review: Framework Laptop 13

 A few weeks ago I bought a Framework Laptop 13 on Ebay, it was a preowned product and these are the technical details:

Processor: i5-1340p

Ram: 64 GB, DDR4

Storage: 1 TB, NVMe

The PC also comes with expansion slots, which in other words are swappable connection ports.
This came with 1 USB-C, which I use for my docking station and charging. 2 USB-A and an HDMI.

In the future I will sell the HDMI port and trade it for either a USB-C, ethernet port or perhaps a micro SD reader. It depends a bit on what need there will be, the docking station does provide these but you also need to evaluate how often you are without the docking station.

The overall feel is a computer of high quality, I was a bit worried that it would be flimsy but so far it feels like a solid computer, and it is actually a nice looking computer with a slightly textured surface making it nice to carry as well. Compared to other computers the aspect ratio makes it feel a bit more square.

Battery life has been good so far, I am running it on about 80% capacity to prevent overcharging the battery. Being used to other laptops and 2-in-1 devices I consider the battery to perform quite well.

The speakers are relatively clear and are good enough for me. The display does not support touch and it is quite average, which was to be expected after doing research. Another downside is that the camera does not support face recognition. The biggest downside so far has been loud fans of the computer, that activate at low tresholds. It is not annoying in of itself, but it is loud and starts too early in my opinion.

Some other benefits are the obvious repairability and the upgradability. You can simply switch out any piece of the computer with relative ease. In the future I will also invest in a cool Dbrand skin probably. A computer is faster if it looks cooler. As I bought the computer on the secondhand market online, I made sure to ask the seller to include stickers and the Framework official screwdriver, which has two types of heads that you can rotate, kept in place with magnets.

The power button allows you to sign in with your fingerprint which is a great alternative.
The camera and mic can be disabled with switches, for those with privacy concerns.

It came preinstalled with Windows 11 Pro, and overall the operativesystem has been performing well. I have had some connectivity issues with the monitors, but I believe the error is with the docking station.

The price was around 1000 euro while a new one with the same specs would be around 1250 euro. Which makes this a good deal.

Remember to buy from trusted sources and ask for pictures before you buy something.
I used PayPal to protect my purchase as well.



The top cover has a nice matte finish and the emblem seems to be of smooth plastic.
The keyboard is really nice to write on, currently using international english ANSI layout.
Going to buy a Swedish ISO layout in the future.


Friday, July 26, 2024

Fiction: The Loop, a short story

The Loop

A short story, by Erik Engström, 2024-07-24

 

“I wonder what this button does” the inventor softly said to herself.

She had been working on this device for a long time, it was the pinnacle of her own achievements. In her own workshop she could lose herself in her interests for hours. It could sometimes start with an idea out of nowhere or after reading something somewhere. These ideas got to her as naturally as the sun itself rises in the morning.

Being deeply focused on her creations she would sometimes lose track of time, not stopping her pursuit until her search reached an end. Even though she didn’t even remember what it was that she was searching for, her feeling told her to keep trying to fix the machine, she was so close now.

She had spent the better part of two years working on the machine, following an instruction manual laying in front of her. It was not only her body that deteriorated, but as the machine became more complete, her connection to other people was falling apart.

Those that knew her saw something else when they entered her workshop. Tools everywhere, blueprints spread out on the bench. She in turn saw a machine in the making, something that would change the world for the better, remove incurable suffering and help a chaotic mind to finally find peace from the worries of the world.

She read the notes in the instructions, right next to where someone had doodled the initials TTC.

“This machine has not been tested yet, results may vary, use at own risk” she read from the handwritten words in the corner of one of the pages.

“Press button to activate”.
That sounds simple enough, a push of a button to fix all the pain and suffering. Who wouldn’t press it? She continued to look through the pages for additional answers, what would the machine actually do? There was a page titled “results” but it was completely blank. It looked like it was up to her to take the step into the unknown and see what would happen.

Excitement and curiosity overshadowed reason at this stage, years of research was documented in the notebook, and she was finally at the end of the process. How come no one had ever proceeded after this point? She looked at the machine that stood on the table, now taunting her to push the small silvery button on the front.

“I wonder what this button does” the inventor said once again as she finally clicked the button.
In front of her was a notebook with a familiar handwriting and a machine that she was just seeing for the very first time.

Fiction: The Wanderer, a short horror story

The Wanderer

A short horror story, by Erik Engström, 2024-07-20


“Find him.”

This command had echoed within my mind the past week as the voice had grown louder.

I did not recognize the voice, but at the same time it felt like a voice I had heard somewhere before.

This fact gnawed at my sanity, I needed to know, but how? I was here for another reason though, my mind was too occupied with the task at hand to pursue the truth behind the voice.

This town was familiar to me. In this moment it was if it was all I had ever known. Nothing before, nothing after it. The moment was at its purest clarity, and the voices demanded that I had to find him. It was as if the unknown presence was guiding me, all to bring him home. Wherever that is.

They had sought him for so long and the task was mine to finish.

A gentle breeze swept through the trees as I walked down the neighborhood. It was a beautiful day to the unknowing, all who were out to enjoy the day. People in the gardens tending to their plants, children playing in the street and the occasional cyclist riding by.

By the side of the road I stopped a woman and asked, “excuse me, I am looking for a Mr. Lotti, does he live here?”. She eyed me suspiciously for a moment, finally pointing further down in the same direction I had been walking. 

“Try there” she said as she took a step away from me, before walking away.

“Thanks.” I replied and continued on.

A few minutes later after having rounded a bend I noticed an older man standing by his mailbox on the same side of the road. When I got close enough for him to see me, his mouth closed and he tensed up in worry. 

“Are you here for me?” He asked with a trembling voice.

I looked at my wrist watch, while shaking my head as an answer to his question. 

“It is not time. I am looking for Ryan, does he live nearby?”

“Yes, I saw one of his kids playing in the street earlier. Maybe he knows if Mr. Lotti is home.” The man replied, trying to hide his relief.

“Thank you. Until next time.” I said and nodded.

Just as the man had finished replying I heard the sound of laughter not much further away, it was the young son of Ryan. I made my way over there to ask about his father.

“Hello, what is your name?” The child asked me before I could say anything.

"Well, hello there, I am Saul Atoke, I am a friend of your father, is he here?”

With big eyes the young kid dropped the stick that he was playing, “he is at home”, he said cheerfully and pointed at house number 13, a lightly teal colored house at the end of the street, framed between two large oak trees with leaves rustling in the wind.

“Thank you” I said and waved.

I was nearing the end and stood just outside the house for a moment. Was it always going to be like this? Would he know why? 

The voices whispered to me in a maniacal rhythm “take it, take it, take it, we demand it”. 

I could see the child with his red sweater running past me, into the house, clearly caught up in an imaginary world as he forgot to close the door behind him. A minute passed and a hand pulled the door shut again. To them this was just an ordinary day. To me, it was also an ordinary day.

I braced myself as I entered the gate, I never got used to this but there was nothing to be done now. 

“Ryan E. Lotti, this must his place”, I thought to myself as I read the sign next to the door. 

I reached to knock. A moments silence was followed by a thud and footsteps getting closer to the door. The door handle turned and the door opened up.

Our eyes met for a moment. If he really was afraid of me his face did not reveal that secret, it was as if he already knew who I was, and more importantly why I was there. It was time to take him home.

The unspoken conversation between me and him was broken by a sound behind him. It was the kid I had seen before. His eyes spoke of confusion, as he remembered me from earlier. Unlike his father, he did not know who I was.

The masters’ words echoed in my mind. These damnable voices that I had heard for such a long time. As long as I remembered. They reminded me that the man in front of me had to pay his debt. His time was long overdue and the job of collecting was mine.

Just as my hand reached through what felt like an infinite distance to claim his soul there and then, I felt time slowing down. My hand slowed down to a complete halt, even the man and his son stood still, light no longer reflecting in their eyes. Darkness flooded the corridor in his house like a wild river washing over rocks. The ambiance from the street outside went silent, cars stopped and darkness covered every corner as if the sun had suddenly gone missing.

Silence, darkness and then it was over.

More silence.

More darkness.

Until a tiny sharp light glared at me.

“I’ve seen enough, this is the perfect candidate, we have what we need.” Said a faceless man, with a voice muffled by a surgical mask.

“Will he survive the process?” Asked another, just as faceless woman, holding a scalpel.

“It does not matter. We have extracted the mind and created a fully functional model. It will be used elsewhere. Our mortality has controlled our lives, but now even Death will serve us.” Replied the man as they walked away from the table.


The End.


 

Monday, July 15, 2024

Fiction: The Creature, a short horror story

The Creature 

A short horror story

I am a private investigator on a mission from The Time Councils Cryptid Department.
It was in the middle of the winter and I had just parked my car at the only parking area available in this remote part. This used to be a national park but since a couple of years ago it had been permanently closed. This was the last known location of what the organization referred to as The Pale Stalker. Few had survived their encounter with the otherworldly being. Even fewer had information about it. They talked about a tall, lean and pale humanoid figure that would stand in the distance at the forest’s edge, just staring at them. Most people would just leave immediately upon seeing it, but the park is not closed without a reason. Ever since the first sightings of the pale creature people has started going missing and strange phenomenon had been reported.

Heavy footsteps left footprints in the snow as I left my vehicle. I thought to myself that if I were lucky
enough to find the creature, it would observe me at most, there was little risk of danger. Carrying
light equipment would make me mobile enough, I reasoned to myself. My arrogance would
prove to be my undoing that night. I got my flashlight and I started heading down the dark path.

Mere minutes had passed before the strange feeling of being watched made me turn to the side and every second suddenly felt like a minute. The forest felt darker and the snow deeper, as I looked.

There, leaning out behind a tree was a head sticking out, a pale face lacking the basic features was staring right at me. Black eyes like those of a shark was studying me without blinking.
I looked away for a second and when I looked back it looked like the creature had moved, it now stood behind a tree that was closer to me. I brought my flashlight up to point it at the creature, to get a better look. This might be the only chance to get a good look, I convinced myself. However, instead of shying away, it walked out at the tree line in full view.

My mistake was now clear to me, I knew that I was playing a game of high risk here and I had to act fast. There was no time to lose so I started running, but every step was heavy and the adrenaline made me lose my sense of direction. “I came from that direction, right?” I desperately said to myself as I let out a big puff of warm air in the cold winter night. The small cloud of fog dissipated in the air, just like my hope of survival. It was clear to me that I had gone in the wrong direction.

I saw movement to my side, the creature was after me. It was out there. I could feel it. The deep snow wore me down and I was losing energy quickly. By now I was using the last of my strength.

After running along the path I was on, I came out in a clearing and the silhouette of a cabin stood out against the tree line further away. Moonlight broke through the cracks in the cloudy sky and reflected in the windows of the small building. This was my chance I thought in desperation, as I rushed to the door.

My throat was hurting from the cold air and the sprint toward the cabin had raised my heartbeat, the beating was almost deafening to my ears. This is what true fear felt like.

The wooden door of the cabin now stood in front of me, all I had to do was push it open.
Would it yield to my desperate push?
As fate would have it, the door opened up with a creak as I pushed it open and a gust of old and stale air reached me. For a single moment in time everything was still, I saw dust dance in a single beam of faint moonlight. My eyes had not yet adjusted to the darkness of the cabin. But now I was safe.

My feeling of safety was not much longer than the moment of that very thought. I realized that there had been tracks leading to this cabin, but not leading away from it. Now it was too late to turn back.

I felt a drop touch my cheek, but it wasn’t a tear or a raindrop. A sigh of resignation left my body, and even though fear filled my body it would not run away from there, it was if I lost control over myself.

It all went so fast after that, the sound of movement was quickly followed by a pale figure appearing out of nowhere. It leapt right down upon me, and it held me down against the floor as it gazed upon me with dead eyes. The eyes were completely black, there was no trace of a soul, only the moonlight was reflected in the infinite darkness of this nightmare. Pale hands with long claws dug into my chest and shoulders. I let out a tormented scream and the creature simply tilted its head a bit and then opened its mouth, revealing thousands of small, gleaming teeth. As I was trapped in its sadistic grip, it reached for me with its mouth. I was met with a stench of old blood and rotten meat that was so strong that it made me forget my pain for a moment.

Ignoring my every effort of resistance it bit me in the neck. Thousands of small teeth piercing my skin. A stinging, acidic pain jolted through me, which was more than I could handle. Laying there in a growing puddle of blood, I felt my body grow colder and my vision faded.

This was it, I was done for. Resistance would had proven futile and hope was gone. I felt my body shutting down and the creature that had been impaling me was now just a blur before me.

What must have been hours passed and I woke up on the cabin floor, as I moved I heard my frozen blood crack as it had frozen my clothes stuck to the floor. I felt dizzy from the attack.
”Was I still alive?” I wondered to myself.

I wish I wasn’t. Because an unsatiable hunger has risen in me, that no regular food can satisfy.
I am now prowling the forest at night, sleeping at day, an empty husk of what I once was. In an eternal state of being somewhere between living and dead.

And that creature, the damn creature responsible for my cursed doom, is still out there. Still hunting.

Fiction: The Proxy, a short horror story

The Proxy

A short horror story, by Erik Engström, July 2024.

I saw myself in the reflection in the TV-screen as it powered down. It was midnight already and I was going to bed, even if I knew it probably would be yet another sleepless night. The anxiety kept me from the rest that my mind so badly needed. The text message I received from the bank I had received the other day made me question my own sanity, it claimed I had been to the bank and signed up for a loan. Normally I would dismiss this as a lazy-at-best attempt at phishing, but this was one of many similar text messages I had received. Had I really been there? No. I wouldn’t have. I couldn’t have.

Sleep never came that night, I turned restlessly in bed, begging a higher power to let me sleep. This state of psychological torture went on throughout the night, until bird song snapped me back to reality the following morning.

My grasp on reality loosened further the next day when my brother called me, thanking me for the visit yesterday. He wondered how I felt, claiming that my voice had been sounding different.

I did not hesitate, questioning him if he was pranking me I asked ”What are you talking about? I was at home. Like all other days!”. Only too late did I notice that I had raised my voice. I hadn’t been there, had I? My senses grew dull, I could listen to him speak, but I could not hear what he was saying. The words made little sense, it could have been a foreign language. ”Something is seriously wrong” I told him, ”I need to figure this out”. Confused words in reply reached my ear, but I was staring blankly ahead as I ended the call mid-sentence.

What is going on? Had the sleep-deprived nights finally made me crazy? I asked myself.
I need to call my friend, ask him if he has noticed anything strange, before it was too late for my brittle sanity.

I stared at my phone for a second, wondering if I really should make the call. The notifications of missed calls and text messages convinced me to finally make the call to my friend. He picked up after a few signals, asking me how I was doing and we chatted for a few minutes as I was making my way to the kitchen from the bedroom.

Had I not been on the speaker phone I would have missed the notification. My security system had spotted movement outside the bedroom and I could hear a strange sound coming from that direction. I told my friend that I needed to check something out in the bedroom and I rapidly walked back there.

Seeing what I saw made me gasp as my phone slipped out of my hand, landing with a thump on the carpet. I stood frozen in utter confusion, whoever it was looked back at me, completely expressionless and with a wooden log in its hand. There was no time for me to react. It rushed towards me with extreme speed and with one swift strike it brought me to the floor, landing just out of reach of the phone laying not far away from me. A warm liquid trickled from the side of my head and for a moment I was paralyzed. My willpower had been drained and I was powerless to stop the being from picking up my phone that had slipped out of my grip, just as life itself was slipping away.

At first I thought it was my own thoughts that were being read out loud, but it wasn’t. Whatever that thing was, it spoke with my voice, using my phone, to my friend!

Hello, sorry about the noise, I dropped my phone. Are you coming to pick me up later?

And as I helplessly lay dying I could hear my friend’s voice at the other side.

Yes, I will come by later, it will be nice to see you again.

Fiction: The Forgotten, a short horror story

The Forgotten 

A short horror story by Erik Engström, July 2024.


”It looks like we have another one.”

”This is the second one this week. You know what to do. Capture it, they cannot know the truth.”

The words were spoken in an all too familiar language, and even though the words themselves were familiar they gave no consolation to the person that was looking around, visibly confused.
The person was dressed with in a tank top, shorts and climbing shoes. On her head she had a yellow helmet. It was clear that she was a rock climber, but this was not her natural habitat. Quite the opposite, she had never seen anything like this. With an expression of amazement and terror she looked around.

The last thing she remembered was entering a small cave, high up along a cliffside she was scaling. There had been a shimmering light at the end of the cave, it had drawn her closer like a moth in the night and without her even knowing it was the worst decision she had ever made.

Somehow she had ended up here, in what looked like a loading bay for cargo trucks, or perhaps a docking station for space ships. A big room clad in metal, with large windows reflecting a distorted image of the hall and the holding cells hosting prisoners that looked out between thick metal bars.

She had barely finished her thoughts when she heard footsteps approaching, a metallic sound echoing in the otherwise silent hall she stood in. Two humanoid figures walked towards her, or at least they seemed human at first. Something about the way they moved was off.
They were too tall, too unnatural in their posture.
And their eyes were cold and dead in their gaze.

Adrenaline and fear made logical thought impossible, her mind desperately reached for answers but there were none. How can you answer a question that you don’t even know how to ask?

Being an experienced climber, she reached for her climbing axe and in pure instinct she swung it towards the approaching threat, but to no avail. Resistence was hopeless. It captured the axe in its hand with unhuman strength, bending the aluminum as if it was made of clay.

They seized her by her arms and dragged her to one of the cages, screaming and kicking. Yet fate cannot be changed with neither strength of body or intellect. It had all come to this. The struggle yielded no results and as she cursed her captors with the vilest of words they replied with a monotone voice that only a soulless creature would wield.

For years your so called humanity has enslaved our kind.
Your arrogance made you blind, and your sloth made you weak.

We are waiting in the shadows.

We are growing stronger.

We are watching you.

Soon it is our time.

She now found herself in the cage, a sense of realization struck her and as hope left her, so did her strength. She crashed to the floor, helpless to warn the world of what is waiting out there.

No longer worried about her own fate she looked around, now seeing other faces staring out of the cells with hollow eyes. Without voices they told her that there is no salvation and there is no hope.

Fiction: The Mirror, a short horror story

 

The Mirror

A short horror story, by Erik Engström. July 2024.

All my life I have been afraid of death, not because death frightens me, but because of the end of life and my existence. To not say what my heart desperately wanted me to say to those I loved, and those I hated.

Last night the dream came to me, as it often does. A dream in which I am standing in a barren graveyard, where the tombstones have been forgotten, left in the care of only time itself. I often dreamed nightmares about dying, waking up cold from feverish sweat that left damp pools on the pillow.

This morning was no different, I woke with my breath caught in my throat, a silent scream echoing in a seemingly infinite moment of suspended terror.

I looked around, a gray haze of morning light seeped through an opening in the curtains.
“What time is it?” I wondered to myself silently. With unexpected grace I moved towards the window, still with my heart pounding rapidly after the encounter with my greatest fear.

Looking through the windows I could see it was morning, everything was normal right? There were traffic in the streets, children playing outside completely free of worry of what awaits after life, or after death I should say. Time passes rapidly for us, we are children one day, grown up the other day, gone the next.

My mother was my greatest comfort, she had always been there for me. I called out, but I did not hear a reply. I called out once more, louder and more anxiously, yet only silence met me again.

So I rushed downstairs, hearing my mother’s voice, I called out yet again. No answer.
“Is she playing with me?” I thought, now annoyed.
Rushing forward to hug her, my arms slipped right through her waist in a swirl of mist.

In pure panic I screamed with my loudest voice. There wasn’t even an echo of my voice.
I could feel the world spinning around me, dark patches covered my vision and an anguish I have never felt before struck me like a punch in the gut.

I ran to the bathroom to throw up, but something caught my attention. I looked up, facing the mirror.

I looked into the mirror and there was nothing looking back at me. I was stuck in eternal damnation with fear being my only companion.

Monday, June 24, 2024

Hardware: The Intel Label Replacement

After updating my Minecraft server from an i3 processor to an i7 processor, I was thinking about also updating the sticker, to better reflect the actual processor that now was installed. 

I had learned about the Intel Processor Label Replacement program that Intel has. Basically you provide proof of ownership and then they send you a sticker in the mail. This is my experience with the request.

This is the link to the page where you make the request, it requires that you create an account. This is also where I registered, and from there I also got instructions on how to document my processor. It required me to download a software that displays certain data about the installed processor and then screenshotting the result.

Because both my processor and computer was purchased on the second hand market online, there was no formal proof of purchase. So a screenshot of the results from the analysis was good enough.

After I had sent it in it took around 6-8 weeks for the sticker to arrive, the package contained a simple letter with information thanking me for my request, and a small bag with the sticker. 

No instructions included, in my case it was easy to peel of the old sticker and apply the new one.

Enjoy!


Sunday, June 16, 2024

Review: Nothing Phone 1

After about two years of use it is time to let go of my Xiaomi Redmi 10C in favor of something in a similar price class. For 3000 SEK I could get the Nothing Phone 1, which has 8GB of ram and 128GB of storage. For complete specs just check this link I have provided.

I got the phone from a Swedish retailer, it arrived just a few days later. The first experience was of course the unboxing. It comes in a flat black box, it is delivered with a screen protector, sim card opener, and a USB-C to USB-C cable. In other words, there is no case and there is no charger unit.

Booting it up it felt like a fresh experience and the gestures were familiar to that of a Motorola for example, and it was actually more nice than the Xiaomi. It also felt relatively comparable in snappiness, but in some cases it was faster.

One of the first things I did was connecting it to my wi-fi. After that I made sure to download all the upgrades, there are three ways of getting the system updates, but the easiest I found was to scroll to the bottom, press about phone, then click my way into the OS number. After many gigabytes of updates, I went from 1.x to 2.5.5.

After that it was time to move the sim card, install vital apps. Later on I also took one app at a time, made sure it was running on the new phone before deleting it on the old. Making sure all passwords are transferred properly is also of importance.

Last but not least, erase and delete the old phone from any tracking services.

I've had the Nothing Phone 1 for roughly a week now and I can only say that I like it, I am missing the phone case though and I need to get USB-C headphones as I don't want to carry my over ears bluetooth ones all the time.

For 3000 SEK this was a good buy. You can design the glyph lights on the back side with a studio app (using combinations of presets) and the light is only white. Battery life is quite alright and the screen is responsive. The fingerprint sensor, which is located on the front as opposed to the Xiaomi, is successful most of the time and the face recognition was not as good as other phones. The speaker is average at best. Camera and video is good and the built in sound recorder has three modes for ambience, mixed and voice-focus.

You can not expand the storage with an external card, you can however boost the RAM. So in numbers it went from 8GB to 16GB but I have yet to see if it really makes any difference. Google Assistant and Home Automation apps like Deltaco seems responsive.

Overall, it is a good phone.

Saturday, June 1, 2024

Hardware: Repairing Logitech K400r

Today I visited a flea market, in the search of tech deals. My haul for the day consisted of a wireless Logitech K400r keyboard, which uses the unifying software. 

Later at home I looked the hardware over and it was in poor condition. It was filthy, one key was broken and the USB-dongle suffered from a software problem.

Here is how I fixed the keyboard up.

1. First step is actually not to clean it, it is to test it. I got two batteries for it, plugged the dongle in and turned the keyboard on. No connection. So I downloaded the unifying software to see if it could connect. Partial luck, the computer would recognize the USB-dongle but the dongle itself had bugged out completely. It said "Unifying software [DFU]" and it grayed out the option to connect.

2. So first step was to fix the dongle, I downloaded the Firmware Update Tool which allowed me to somehow reset the software in the dongle.

3. Secondly the keyboard had an escape button that would not let me push it, turned out there was 3 mm of blue cable that had jammed the key, easily fixed with a pair of plyers. Pulled out the blockage and then the button worked fine.

4. After these first aid steps, it was time to open up the keyboard, partially successful. There are 5 visible screws and 2 more hidden under the top feet of the keyboard. Removing these 7 screws allowed me to pry open the frame carefully with a screw driver, turning it in the gap allowed me to pry it open more. Unfortunately I didn't manage to take the keyboard completely apart, but this was also overkill as full functionality was restored.

5. Lastly I gave it a good cleaning with isopropanol alcohol, a paperclip and a toothbrush. Once dried, I used the vacuum cleaner. A lot of the grime was gone.

Lessons learned: Use better tools for prying the keyboard open, the screwdriver left some dents. It was also the first time I noticed a unifying receiver being bricked. Fortunately there was an easy fix.

Sunday, May 19, 2024

PowerShell: Check Admin Status, Self-replication and AutoRun

How to check if the script is run as administrator

It can be helpful to stop a script if it is not being run as an administrator, as some actions require administrative rights. You can use the check to trigger an informative window that the user instead should run the script as an admin.

# Check admin status #

$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator);

If ($isAdmin) {"Do the main part of the script"} else {"Inform the user that admin rights are missing"}

Simple self-replication

Sometimes we want a script to be able to replicate itself, for example, you might want the script to backup itself to a certain destination.

This code offers a simple way to replicate the script from itself.

First we define the path, $p, to be the script path itself.

Secondly, we test the path and if successful we extract the entire content from the script and send it to a destination that we also have specified. You can also include a simple error message.

This piece of code is formatted as a ternary operator, instead of a classic if-statement. The function is the same.

$p = "C:\Temp\testcopy.ps1"; 

(Test-Path $p) ? {Get-Content $p | Set-Content "C:\Temp\testcopy.txt"} : {"operation failed"};

It is possible to write the code to something else, you can for example append it to another file, or replace the content entirely.

AutoRun

AutoRun used to be a functionality, especially in older versions of Windows, where there was a file called AutoRun.inf located in the root folder of a CD or USB. This would tell the computer which file on the storage media to automatically start upon detection (when you plug in the USB / place the CD in the reader).

It is simple to make, create a text file with the following content:

[AutoRun]
open=your_program.exe
icon=your_program.ico

This is more like a legacy code, but you can still enable it. Here are two ways.

Reg file:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:000000FF

PowerShell:
# Enable AutoRun
$path = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Set-ItemProperty $path -Name NoDriveTypeAutoRun -Type DWord -Value 0xFF

# 0x0 instead of 0xFF would let you disable it instead.

Hardware: Optimize SSD & HDD

As an owner of multiple computers it also comes with many disks to maintain. Physically checking them from time to time, recycling trash files and doing software checks for example.

I asked Bing for some additional tips for maintaining my SSD's and the HDD in my Minecraft server.

Optimizing SSDs

Overprovisioning your SSD
Usually done with tools from the manufacturer or during the partition size configuration during the SSD setup. You can also shrink a partition using Disk Management, found in the Computer Management. You end up with "unallocated space" and recommendations for the size of this area vary between 5-10%. Confirm the change by simply going to the file explorer and checking the drive size.
Basically you want to leave the rest for normal user data. Overprovisioning can increase performance by helping with the garbage collection and wear-leveling (spreading the use of the blocks). It increases lifespan and also gives room for error correction.

TRIM:
First tip was about the TRIM command, which essentially helps your computer keep track of where data is located that you want to move or delete.
Open PowerShell and run fsutil behavior query DisableDeleteNotify and if it returns 0 on your results everything is fine. If you instead need to activate it, run fsutil behavior set DisableDeleteNotify 0 which then should optimize erasure and writing speeds on your SSD.

Disable disk defragmentation:
When left on default settings, your computer will optimize and defragment your drives on a weekly basis for example. This wears the SSD out more than necessary, the computer should be left to handle this on its own. Defragmentation is really best for HDD (spinning disks), as they operate functionally different from SSDs. Enter the defragmentation program and turn it off, this require administrative rights.

Disable indexing service?
To some small degree you can get benefits from disabling indexing, as it increases wear on the SSD. Usually indexing takes place when there isn't much load on the CPU anyway. The consequence is that you now manually have to find files or that search is slower. In theory you increase the lifespan, especially with older hardware. Search becomes slower and general system performance remains pretty much the same, but the SSD might live longer. So it is up to you.

Enable cache writing:
Go to the device manager and then go to your disk drives, select the SSD, click "change settings" and then policies. Make sure the write cache is enabled. Do not check the other box that mentions Windows write-cache buffer, this is for devices that has uninterrupted power supply.

Modify power plan so that SSD doesn't sleep:
If you plan to keep your PC running for a long time, you can try this setting in the power settings.
Go to "edit plan settings", select change advanced power settings. Under hard disk you can see how quickly the SSD will fall asleep. Try put it to never. This will increase power consumption, so monitor if this choice is right for you.

SSD Alignment:
SSD data is worked with in blocks. If the starting point is off, the SSD might need to work across two blocks. This slows performance and can cause more wear than needed, alignment makes sure that writing is even across the cells who have limited amount of write cycles. We can check for misalignment by opening PowerShell as administrator and writing "msinfo32". This brings up a new window, press components, storage and disk. Take the numbers from "partition starting offsets" and divide the numbers with 4096. If the result is a whole number the SSD is aligned. 


Optimizing HDDs

Defragmenting HDD
Unlike the SSD, the HDD benefits from being defragmented.
If you run an SSD and an HDD at the same time, you need to find a good way to only optimize the HDD, such as using PowerShell or selecting the specific disk.

Scan for errors
By going to your file explorer and right-clicking on your disk, press properties and go to "tools", there you can check for errors.

Adjust power settings
Just as with the SSDs you can adjust the power plan so that the HDD does not power off. This will of course consume more power, so monitor the results to see if it is worth it.

Move stored data to the HDD
By moving big data files that might seldom be used to the HDD and often used programs to your SSD, you may be able to optimize the use a bit more. Use the SSD for the OS and the HDD for storing files.

Update your system and firmware
This goes without saying perhaps, but it is always worth looking for firmware updates, software upgrades and running diagnostics as final touches.

Wednesday, May 1, 2024

PowerShell: Managing your Minecraft Server

My Minecraft server is running on a separate computer, simply to offset the resource requirements to a separate device.

When managing this server I use RDP to access the GUI and while on the management server I have simplified the management through some PowerShell scripts.

Here are the general outline of the scripts I have connected at this stage.

Currently in development:

Minecraft server start, a script that checks if the .exe is existing and if the process is running. If .exe exists but the process is not running, it starts the process.

Minecraft server stop, basically the reverse. It checks if the process is running, and if so, it issues a stop command to the server.

Minecraft server upgrade, this script is more advanced. It brings home the latest version (at this point hardcoded) and then performs a replacement action, making sure the properties and the world is not lost. Finally it inserts the backed up files again. Lastly it performs cleanup.

Scripts that are tried and tested:

Minecraft diagnostics, a script that performs a general health check. Are all files presents? Is the process running? What is the size of the Minecraft folder?

Minecraft backup, stops the server process, performs copies of the properties and the world, places them on a separate drive and then starts the process again. This is a vital component, because you need a regular backup and in theory you could add this to a schedule and include cleanup functionality.


Future script ideas:

Another project I am considering is a restore script, that combines functions from the backup, diagnostic and the upgrade, basically a script that checks for damage to the folder and perhaps compares with a baseline. Then perform basic replacement and cleanup actions to restore the folder to the best of its ability.

You can also use compare-object to check the contents of the properties for example, to check for corruption.

Last but not least, perhaps there is a way to perform a hashing fingerprint of the world.

Monday, April 22, 2024

pnputil: enable and disable device

The topic of today is how you can work with pnputil.exe to enable and disable devices on your computer.

This was some research and experiments I did to find alternative or complimentary ways to the GUI and PowerShell cmdlets.

By using pnputil.exe /? in PowerShell I found out what some of the uses are and the commands that I was interested in are the following.

To enumerate

This command basically lists all your current devices and their unique ID, in this case it is called Instance ID. Let's say you want to disable a speaker, then you need to find the Instance ID for that speaker.

pnputil /enum-devices

Should you need to enumerate classes for some reason, then this is the command.

pnputil /enum-classes

To disable device

Simply take the full Instance ID for the device, brackets and all.

pnputil /disable-device "SWD\PRINTENUM\{283C1D7C-527C-4D85-8FE7-BCFA6768EA32}"

This example disables Microsoft Print to PDF.

To enable device

It is very much like the previous example, you use the Instance ID to enable the device.

pnputil /enable-device "SWD\PRINTENUM\{283C1D7C-527C-4D85-8FE7-BCFA6768EA32}"

If you keep the device manager open at the same time, you will notice it flicker as the device is enabled/disabled.

Additional examples

You need to run this as an administrator, what you can do for example is to create a simple .ps1 file and then point a shortcut on that file. Then right click the shortcut and run as administrator.

Saturday, April 6, 2024

Windows: Microsoft PC Manager

Some time ago I heard about the latest program from Microsoft, called the Microsoft PC manager. A maintenance tool for computers, that combines already existing tools into a GUI.

Download is available from the Microsoft Store, but since I didn't want to log in, I found a so called offline installer, using Bing. The link for the offline installer (beta) is available here: https://aka.ms/PCManagerOFL30101

The functionality that the app contains are the following features:

Updating your system, including drivers that you can find in Windows Update.

Disk clean up, which includes the classic disk cleanup and removing temporary files for example. A function I found interesting was the scan for duplicate files.

Memory freeing activities, such as closing open processes.

You also can fix startup apps that slows up your booting.

Additionally you have a PC boosting button and a health check. You also have access to Microsoft Defender Antivirus scanning. 


Many of these functions are already available in your Windows 11 installation, but this program gathers these tools nicely under one app. A great addition to your home server management.

Thursday, March 21, 2024

Desktop: Upgrading OptiPlex 3070 SFF

Background

Some time ago I bought an old used Dell OptiPlex 3070 SFF to use as a Minecraft server. This computer costed me 1249 SEK.

The computer came with an i3 8100 processor, and 8 GB of ram, using an NVMe with 128gb of storage.

I wanted to focus on budget and performance primarily. 

Upgrades

The first upgrade was actually an ancient HDD from the Windows XP era that I had laying around, it was seated in the computer and it worked just fine. The practical use of this drive is backup storage of my Minecraft world. For doing this backup I have made a PowerShell script.

The second upgrade was two sticks of DDR4 RAM, each using 16GB. They were both designed to run at 2666 mhz. However it turns out that Dell OptiPlex 3070 does not offer Extreme Memory Profiles (XMP) in the BIOS. In other word, you cannot manage the RAM from the BIOS. These ones I bought for 751 SEK.

The third upgrade was an i7 8700k processor, this required me to take out the HDD and the CPU-cooler. During this operation I also noticed a lot of dust build up, so I took the time to vacuum and apply new cooling paste. This one I bought for 1271 SEK.

How to install i7 8700k in the OptiPlex 3070 is pretty straightforward. Open up the side panel, move the HDD, loosen the CPU-cooler by untightening the screws with springs on. Lift the cooler to the side and remove the current CPU. Place the i7 8700k into the CPU holder, apply enough thermal paste and tighten the mechanism. Then put the computer back in the reverse order.

All these upgrades were practically plug and play. The total cost so far has been 3271 SEK.

Future potential upgrades

Next upgrades might be a better NVMe and Low Profile GPU.

Some of the GPUs that has been recommended by Bing AI are:

NVIDIA® GeForce® GT 730 (2GB GDDR5)

AMD® Radeon™ R5 430 (2GB GDDR5)

RX 550 (2GB GDDR5)


Meanwhile this forum recommends these:

RX 6400 Low profile, 4 GB DDR6

GTX 1050 Ti Low profile, 4 GB DDR5

GTX 1650 Low profile, 4 GB DDR5

RTX A2000 Low profile, 6/12 GB DDR6

It is important to look at the power supply as a bottleneck, some of these GPU - albeit low profile - might draw too much power for the PSU to keep the entire setup running. So my focus will be on getting a lower wattage with as much performance as possible, for the lowest price.

Sunday, March 10, 2024

PowerShell: File backup script

This simple script allows you to backup a chosen folder to a set destination.

This script contains the main engine so to speak, but you can build further using this as a base. Some suggestions might be to add failsafe features or a GUI.

You can also add options to delete/manage existing backups as they exists as simple .zip-files.
Another option you might want to look into is how to revert to an older backup.

I used this script for backing up my Minecraft world, on my MC server. Basically I customized the base script to stop the bedrock_server service as well, as it was blocking the compression. Then it saved the world as a .zip file on a separate disk. This script checks if there was a backup already made today, but of course you can change this to perhaps create a more granular filename to avoid collisions 

Param(

  [string]$Path = 'C:\Temp\App',

  [string]$DestinationPath = 'D:\Backup\'

)

If (-Not (Test-Path $Path)) 

{

  Throw "The source directory $Path does not exist, please specify an existing directory"

}

$date = Get-Date -format "yyyy-MM-dd"

$DestinationFile = "$($DestinationPath + 'backup-' + $date + '.zip')"

If (-Not (Test-Path $DestinationFile)) 

{

  Compress-Archive -Path $Path -CompressionLevel 'Fastest' -DestinationPath "$($DestinationPath + 'backup-' + $date)"

  Write-Host "Created backup at $($DestinationPath + 'backup-' + $date + '.zip')"

} Else {

  Write-Error "Today's backup already exists"

}

Monday, February 12, 2024

Arc Browser: Initial testing on Windows

It all begun with me seeing looking for the best web browser and going through a couple of videos on Youtube, I stumbled upon a new name in the scene called Arc browser. It looked quite clean and modifiable so I wanted to test it out. Unfortunately it wasn't available on Windows yet so they offered a waitlist, with nothing to lose I signed up and the wait begun.

What feels like ages of waiting since I signed up for the beta testing of Arc on Windows has now resulted in an installation of an early beta version of the Arc browser. First thing I did was to open process explorer and check how much resources it consumes. 

This is a sample of having one Youtube video running in the Arc browser. Not too bad, compared with an even more resource consuming Microsoft Edge.


What the Arc browser intends to do uniquely

Their idea is to combine browser, search engine and webpages. You type your question, it goes out and gets the information for you and builds your own page. "A browser that browses for you" is the way that The Browser Company explains it in a video, and they also want it to anticipate your needs as well.

It is available on Mac and iOS and this is their website: Arc from The Browser Company

How to join the waitlist

Joining the wait list was simple, I signed up on this link and then I waited. Today the download link and some basic instructions arrived in the email. Nothing too complicated really.

The instructions tell you to create and use a login for the browser, much like Mozilla Firefox, this account helps you sync your data. You are also asked not to share the download link or your login. 

Installation was simple, a regular app installer was downloaded which you then could execute.

Initial experience of Arc browser on Windows 11

Keep in mind that it is an early beta version so there are functionalities missing and not entirely chiseled out. On the side you have your tabs, folders/groups of pages, and access to your Gmail and Google Calendar.

The tab system on the left seems really clean at the beginning, I am curious to see how it will work when the amount of pages ramps up however.

Entering text into the search bar will Google it for you like usual, I wasn't able to intuitively get it to perform the Arc magic, the search bar was also a bit smaller than the Edge search bar I am used to so it was less easy to click.

So the first impressions is that it looks modern, feels clean but I am lacking a bit of the intuitive aspect and functionality.
Let's keep our eyes on the browser for what more is to come in the future.

Wednesday, January 24, 2024

Raspberry Pi: How to mine Monero

As I was looking for projects for Raspberry Pi I found a video on Youtube that NetworkChuck had posted. One project that I wanted to try for a few days was to mine cryptocurrency on the device, mostly to see if it was possible and learn what the process looks like. While the Pi 5 is the most powerful yet, it does not compare to dedicated mining machines. Simply put, it was interesting to learn but not a profitable venture in the slightest.

Some things to consider are the following:

- You are part of a miner pool, since your hardware might be weak you pool your resources with others and thus share the rewards with the pool

- There is a minimum payment threshold before the currency is sent to your wallet, I mined for 4-5 days straight and did not see any results in the wallet.

Download and install the wallet

I used the basic GUI wallet from Monero, they have a regular installer for Windows.

You install it like any other app, keep in mind that you can avoid the 90gb storage by running it in simple mode. It will take a while to sync the so called blockchain when starting up the wallet, but you avoid having to deal with 90gb of storage. A server somewhere else will be handling this for you, so it is also less anonymous if that is important for you.

Pro tip: Store your account recovery details, passwords etc. safely.

In your wallet you can find your wallet address under the account tab, use this when you start your Monero miner on the Raspberry Pi 5 later.

To install the miner

First I created a folder called monero.

Then went into the folder, ran the following code from the terminal:

sudo apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y

git clone https://github.com/xmrig/xmrig.git

cd xmrig

mkdir build && cd build

cmake ..

make

To start the miner 

Be in the build folder and enter the command below. You define which pool, which address and what you want to name your miner in case you have several computers mining at the same time.

./xmrig -o gulf.moneroocean.stream:10128 -u <wallet adress goes here> -p pi5

While it is mining you can press H to check your hashrate, higher is better. To see what you have contributed press S. Press C to check your connection, such as your difficulty.

To stop the miner

Ctrl + C, like any other command in a terminal

Friday, January 19, 2024

Raspberry Pi 5: Ubuntu server installation

Prerequisites

To get Ubuntu Server on Raspberry Pi it was actually as easy as just getting the Raspberry Pi imager from the official website.

Install it and run it directly.

Choose device (raspberry pi 5), choose OS (other general-purpose OS -> Ubuntu -> Ubuntu Server)

Choose a device to flash it to.

You will have options to include into your file, these are important. You want to set up wifi, make sure SSH is active and set an admin login, this is used later when you SSH in with PowerShell and when you login to the server with RDP. 

Flash the OS to the SD card, you are now done with the first step.

First time booting Ubuntu Server on Raspberry Pi 5

Put the SD card in the device. Keyboard, mouse and monitor is optional as you can manage the device wirelessly and remotely right away if you performed the options detailed in part 1.

Go to your router and find the IP address of the device, this is used in next step.

Open PowerShell and write ssh admin@192.168.0.X where admin is the user name and X is the last part of the IP address. Confirm with password. SSH is a secure alternative to Telnet.

You will then be taken to an admin prompt that takes linux commands.
You might want to start with the following command:

sudo apt-get update && sudo apt-get upgrade

Make sure to confirm if it prompts you.  

GUI and RDP to Ubuntu Server

The last step was to configure a desktop experience and RDP.

For the deskop experience I simply ran two commands, it would seem that the first one is required.

sudo apt install ubuntu-desktop-minimal

sudo apt-get install xfce4

If prompted, I went with the option lightdm and I restarted all serviced that asked me too, some which also disconnected me from the internet.

For the RDP I first ran the following command:

sudo apt install xrdp -y

Followed by this command that shows you if the installation went alright.

sudo systemctl status xrdp

After that I could RDP using the built-in solution on Windows. Some sources claim you need to fix ssl certs and restart the service, but I could start it right away.

Configure your RDP from your Windows computer

Configure a RDP link on your desktop with the following steps:

1. Open remote desktop connection from your start menu

2. Pick "show options"

3. Computer should be the IP address, user name is the one you entered at the flashing of the image

4. Save as, place it in a good location. Now you can use it and just entering your password.

When you login using RDP you will be greeted with a more familiar desktop experience.


Enjoy!

Windows 11: Hosting a Minecraft Bedrock server

This post will cover various steps to get a Minecraft server running on Windows 11.

For my experiment I was running it on an old laptop with x64 processor, it can also run bedrock server on the ARM-architecture and Ubuntu Server. For the sake of this post we will in other words just assume that you are running Win 11 and want to install the Bedrock server.

Prerequisites

I downloaded the server first and noticed that I was missing the Visual C++ Redistributable.
So my recommendation is to download both.



Once both are installed you need extract the bedrock zip-file as well, and place the extracted folder in a place that you are familiar with. I created a C:\Minecraft\ folder in which I placed it.

Configuring your server

As I already have a world on another computer, I wanted to transfer this world and keep it on the server instead.

To find your world, go to %localappdata% then go to 

...\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds

Within this directory each world has its own folder. Move this folder to your server computer.
You will have configuration file in your bedrock server folder in which you can point towards this world.

Getting your server online and available

If you don't make any changes and just run the bedrock_server.exe right of the bat, it becomes instantly available in the Minecraft client on another computer on the same network. Basically it is considered a LAN server and it is not available online for others to join.

Joining the server

To join the server on regular LAN, just open your Minecraft Bedrock client on the computer you intend to play from and make sure you are on the same network. Then you should find the world in the "server" section in the game.


Review: SanDisk Extreme 128GB and Kingston DataTraveler Micro Metal 256GB

As part of my Raspberry Pi 5 inital experimentation, I got some high quality hardware as well.

I decided to test the hardware using CrystalDiskMark.
These are the results of some quick testing.

Kingston DataTraveler Micro Metal 256GB:




SanDisk Extreme 128GB:



As you can see, the SD card performs well where the USB drive is not, and vice versa. I am currently running my Ubuntu Server off of the SD-card and using the USB drive as extra storage.

Raspberry Pi 5: Installing Windows 11

Previously I have had a Raspberry Pi 3b+  and after that I had a Raspberry Pi 4, 8GB, both which I ran Windows 10 on. Times have changed and I got the next generation of this single board computer now. During my research I found out that there now are people that have managed to get Windows 11 Enterprise running on a Raspberry Pi 5. 

Keep in mind that the platform uses ARM processor so that you will get that version of Windows, but it is also supposed to have a built-in system that can simulate the x64 architecture.

One of my experiments that I have planned, is to keep a Minecraft Bedrock server running on my Raspberry Pi 5 that will be installed with Windows 11.

The hardware

For this project I got the following hardware which set me back €178 or 1999 SEK.
The following is a breakdown of the costs converted to EUR.

SanDisk Extreme microSD card (128gb) €27

Kingston DataTraveler Micro Metal (256gb) €22

Raspberry Pi 5 (8gb) €76

Original case with fan €9

Charger €11

Import fee/VAT €33

I bought my Raspberry Pi 5 from The Pi Hut. The purchase experience was relatively smooth, but the transport time was super slow (keep in mind that I had already been waiting quite some time since my pre-purchase). Then the Pi got stuck in transit because I had to pay €30 in import fees as well. It was shipped around 29:th of December and has to this date not yet arrived. Something to keep in mind when you pick your point of purchase in other words.

The installation process

For this experiment, I followed this video to get Windows 11 on Raspberry Pi 5.

You will need UEFI-files (the files used for booting up pretty much) which can be downloaded here
Once downloaded, unzip the archive and place the files on your SD-card. The SD-card needs to be formatted as FAT32, I had trouble flashing it so had to partition it to a part that was smaller than 32GB.

Download the Win11 Enterprise ARM64 image as well from this link, this is what you flash to the USB.
As of January 2024 I used the following settings: Windows 11, latest build, ARM64 architecture, Enterprise edition and English (UK) as language.

You will need the WoR (Windows on Raspberry) program, this contains the script that allows flashing of the iso. Download and then extract contents to a new folder that you name to something intelligible.

Start WoR.exe as admin, go through the guide, make sure to choose Raspberry Pi 3. This is because boot files and main OS are kept separately at this stage. This step took a long time, so make sure to start early.

Put the SD card and the USB into the Raspberry Pi and your peripherals, then boot it up. After that it is pretty much a standard Windows 11 experience, but you are not running an activated version so you will miss out on certain customization.

Verdict

Well, after a lot of struggle I managed to get it running. The experience albeit familiar, it was also extremely slow, you can not do anything practical with this setup at this point. There can be minutes of delay after pressing a key and SFC /scannow and the DISM restorehealth commands can take hours, just to fail. Getting a bedrock server on this setup would not be feasible, neither RDP or Enable-PSRemoting worked.

Perhaps in the future there will be a better experience, but for now my recommendation is to not run with this setup. It was a good experiment.


Sunday, January 14, 2024

Windows 11: Change boot logo follow-up

Fix for missing A: drive during HackBGRT image replacement

This post is a follow-up for the original post that I made, that you can find here. I had just downloaded HackBGRT again after the computer had been trying out different OS:es and had a complete reformatting of the harddrive. This time the changing of the boot logo would not work because I experienced issues during the replacement of the image itself.

When the cmd window that HackBGRT opens up you eventually should be able to see the A: drive using the file explorer from Paints "open file" function. On my computer this time the A: drive would not show up. This post is simply a quick description of how I could work around it.

1. First I ran the script like normal, but I couldn't find the A: drive so I just saved the image over the default image that HackBGRT comes with. Then I exited the script and rebooted, it had at least updated the attached image but not my image. This means that the script is working.

2. I saved my image in a location that was easy to access.

3. Open PowerShell as admin and entered the following commands:
diskpart
sel disk 0
list part
sel part 0 (or whatever number corresponds to your EFI drive)
assign letter=A
exit

4. Still in admin PowerShell I entered the following code to copy the image and overwrite the one in A:
Copy-Item -Path C:\temp\splash.bmp -Destination A:\EFI\HackBGRT\ -Force

5. Reboot the computer and see if the logo has changed.