Sunday 22 October 2023

Add a Twitch randomised fact command

 

I recently had a conversation with a friend on stream about creating a twitch chat command that would put a random fact in to the chat.
After some poking around with Streamer.bot I came up with this.
This may not be the most efficient method for doing this, but it was something I was able to set up in a few minutes.

You essentially have a number of actions which are your facts being entered into chat and another action, which is triggered by a twitch !command, that gets a random number between 1 and the amount of facts you have and selects the corresponding action.

I thought I'd leave it here in case anyone finds a use for it.
Do you have an idea for streamer.bot that you want to turn into a reality, drop a comment and let me know!
If you haven't already, I'd suggest you also check out their discord, there's some very friendly and clever people over there. https://discord.gg/VmdKdmVya2

Add a randomised Foxy Facts chat command


go to actions tab

right-click in action list

click add



Give it a name

and you might want to add them to a group for ease of viewing later

click ok



For that action go right-click on sub-actions on the right

hover over "Twitch" and "chat"

click send message to channel



enter the fact

click ok



do that for all the quotes you have


right-click and add another action

do the same as before (add a name like “Foxy Facts”, group, click ok)

right-click in sub-action, hover over "core", "logic", click "Get Random Number"




Enter from “1” and the number of facts you have



Click OK


right click in sub-action again, hover over "core", "logic", click "If/Else"



enter the variable as "randomNumber"

enter the value as 1

click "do action" (the button will say <No Action Selected>)



scroll and select the first fact action



we need to add a sub-action for each fact we have

so, we right-click "core", "logic", then "If/Else"

enter the variable the same "randomNumber"

enter the value of 2 and so on

click "do action" (the button will say <No Action Selected>)


Once we've done all that, we need to set a trigger

click on the “Commands” tab

right-click on the list and click “Add”



Give it a name

give it a command like “!foxyfact”



if you want to set a cool-down, you can do that on the bottom right


click OK


Go back to “Actions” and click on “Foxy Facts”


right-click in “Triggers”

Hover over “Core”, “Commands” and “Command Triggered”



scroll and select the second fact action and so on



Now, whenever someone puts “!foxyfacts” (Or whatever you called it)

It will put a random foxy fact in chat.

Saturday 13 May 2023

A falling out, A genius idea and an idiot moment.

The modem and the router had an argument in the early hours of Thursday night.

They are no longer on speaking terms, so that's why the network has  been down.

Regardless of my attempts of mediation, the two remain inconsolable.


I thought about purchasing a replacement, but I didn't really want to spend £100-200 on a new Draytek.

That's when I came up with the genius idea of making my own router, with black jack and hookers.


I started looking up OPNsense virtual appliance installation and configuration.

Thinking about the physical aspect, cables and such, my first priority was getting the internet over to the server. On the opposite side of the house. 

The current solution was trunking from the master socket up to the office, where the Draytek router resided. From there essentially a patch lead ran from that, through the loft, down into the opposite bedroom, which is my wife's art studio.

Inside the cupboard, aside from some jackets and art supplies, reside my main server, Which provide hypervisor and file services, along with my backup server (which is not entirely live) and a unifi access point.

The first thing I thought of was a spare mikrotik router.

That's when it hit me. You idiot, just use that.


Cut to three hours later and I have it configured to give my pc an IP address and also take an IP address from the crappy nowTV modem/router.

I would have rather preserved my IP reservations, but I decided I didn't have the energy to connect back to the Draytek to note down all the reservations manually, so I plugged in the rest of the network.

I added a few NAT port forwarding rules in place, but at the time of writing, that traffic is still being blocked somewhere upstream, so will require further investigation.


At least now the network has internet access again, so my wife can stream.

I still need to get port forwarding working so that I can start using "private cloud services" and soon my Minecraft mod can get back in the server when they want to.

I'm hoping as the LAN range is the same, the existing client leases will be honoured from a new DHCP server and get given the same IP. That being the case setting the reservations will be a lot easier.

Edit: They were.

Mikrotik's web GUI takes a bit of getting used, but it is starting to make sense. I suppose that's the same with any routers GUI.


Around the outside, I replaced my POE switch, this week.

I had a really old d-link web smart switch, it really wasn't happy. After the third time of waking up to find no network access, I decided to replace it.

I got a tiny 5 port Tenda unmanaged POE switch. Its smaller, quieter and cheaper to run. Yes, I lost VLANning, but the only reason I wanted that isn't a requirement any more.

It arrived and I realised my mistake. This device was POE powered. I hastened to start the returns process, but then remembered that I still had an old POE injector. 

It was only 10/100.

Ok, back to Amazon, cancel the return and grab a gigabit injector.


What I was actually hoping to sort out this weekend, aside from mowing the lawn and doing laundry, was maybe getting cabling down to the living room, or getting a spare Cisco AP installed in the dining room.

This would have been to improve bandwidth for my raspberry pi, who was trying to talk to the unifi on the other side of the house. This resulted in a, let's say, changeable experience when streaming content.


That will have to be for future Rob.

Saturday 20 August 2022

Website and affiliates

I finally got around to completing version 1.0 of my wife's website for her art and business.

I'm not a web developer or content manager, but we went over the requirements, the main ones were a portfolio gallery and an asset rotator on the front page.

It took a while to get to grips with working on this kind of thing again, going through several iterations based on different platforms before finally landing on WordPress.

If you want, you can check them out. I've added the hyperlinks.


Once this was complete and the "customer" was happy, I decided it was time I updated my own website.

For the longest time, it was just a static page with a blurb and contact information. Honestly, it was looking pretty amateur.

The intention as with most websites is to attempt to engage with customers. I always had the idea of driving traffic from places like Twitch, YouTube, Twitter etc to a main site that had all the information in one place and showcase some of my other hobbies and services. I don't really have a particular niche, but I think I come up with or at least stumble upon some interesting stuff on occasion.

I've gone with a generic “tech services” template for now and having removed a lot of the boiler-plate stuff, I think it looks ok. There's basically no information on it presently, besides the contact information, but at least it now links out to this blog. In time, my intention will be to customise the theme for more of a tech geek style, with my central green colour scheme running through it.


Back along, my Sister created a family WhatsApp group for easily communicating updates during a difficult time. She had posted a link to a shower head on Amazon and it ended up being quite popular within the family. I believe at last count, five of us have one. I joked that she should create an affiliate link for it so that she could get a small kick back.

I thought it might be fun to make a pseudo-shop, which showcases things that I've found or purchased that I think are cool or useful enough to show. I created an Amazon affiliate account that I could link out to, so if anyone ever thinks like me and wants to purchase an item, I'll be able to see. This would primarily be for the purpose of learning a bit about something new, I really don't expect to make any money from it.

From there, I also created an affiliate account with my chosen hosting provider Eco Hosting, after chatting with a colleague in the market for a domain. So, I've been toying with CNAMES and subdomains to try and make this a little more useable and professional looking.


Lastly on the website front, I had an idea in my head for some time now for a website that has a bunch of how-to guides about things I've learned while streaming on Twitch.

Things like how to do certain things in Open Broadcast Studio, setup cameras and microphones, add transitions and more custom elements like counters using Streamer.bot.

The ultimate goal would be to have written articles outlining the steps, with an accompanying YouTube video.

The sites working title is "Streaming is Hard"

If you're reading this and have any interest, do please leave a comment to say so and if there is anything particularity you wish to see on there.

There's not really a timeline for this as such. back along I went through my current OBS configuration and noted everything down, with the intention of one day ripping it all out and doing a stream where I set it all up from scratch.

This way, I can easily split it up in to clips to add to the articles. What would be really cool and time-saving would be if I could get some sort of step recorder that I could use to create the framework of the written article. I'll have to do some research, If I remember correctly the built-in windows step record is not quite as clever as all that.


That's about it for this one. I know I say this every couple of years, but I am, once again, going to try and update this blog more frequently and I have a number of new posts in the pipe.

I'm going to try and find a balance between frequency and energy expenditure, so that I don't burn out too quickly.

Keep an eye out for the next one which will be in a few days to a week. I'm not sure which one I will choose for the next instalment, most of them being of a technical nature, outlining what I've setup or done with a particular service or piece of software, but I think they have the bones of something interesting.

Take care of yourself and keep an eye on your spoons.

Saturday 19 December 2020

Half an Oven, Windy Fence Panels and plenty of Mince Pies.

I got home from picking my wife up from work and the oven broke.

It tripped the breaker and then the main oven wouldn't heat up above 50 degrees.

We had a look online and found a suitable replacement.


The whether was pretty bad overnight, to the point where Max was a little uneasy,

but he eventually settled down.


In the morning, I came downstairs to make coffee and let Max out into the garden to find that

a fence post had broken at the base, meaning two panels had collapsed, due to the high winds.


This meant a trip to B&Q to get wood and tools I hadn't already got for the job .

It seems as though where the bushes had become over-grown, the root system had cracked some of the

concrete around the post, which in turn got wet, rotted away and eventually broke.


I tried getting as much of the wood out as possible, which turned out to be about 20 CM, so I gave that up.

The concrete is still solid and almost half a metre square, so I decided I wasn't getting that out anytime soon and even if I managed it, what the hell am I gonna do with a large lump of concrete?


My wife did her normal and searched online for local businesses that did fencing work.


I look down the list of companies and of course, nearly all of them use Gmail or outlook.com or Yahoo of all things.

I browse the websites to look and they're all the same bog standard designs with bad fonts and layouts and even spelling errors, which annoys the hell out of me.

Yes, you may not be able to set up a website yourself and maybe you cant afford to get someone in to do that for you, but the least you can do is proof your own damn copy.


I've been off work for two weeks now. 

Feeling a lot less stressed now that stuff has cleared out of my head and not having to remember certain manual tasks on a daily and weekly basis also makes for a lot clearer head space.

I sometimes catch myself wondering what's happening with those tasks. Before I eventually turned my work phone off, I still saw people emailing me directly with queries and such, so its reasonable to assume some of them are being missed.


I still have no idea what's going to happen when I do go back in January. 

I've been meaning to start writing an email to my boss including a list of things that I think need attention and that I feel would help me to be moved to someone else's remit. 

I've' generally been putting this off to avoid the resultant anxiety, but this has proven to create its own problem in that whenever I put my head down to sleep, my brain immediately tries to run through them all at the same time, so I should really start getting that list down for my own benefit.


Still, now is the time for rest and relaxation over this holiday period. Mince pies are a-go-go and some of the various cheeses in the fridge have been open, not to mention the large box of milk tray I received in the post has completely gone.

Tuesday 8 December 2020

Stress, Anxiety and the welfare of Doggos

I have a couple of a normal routes that I walk with Max.
A few days ago I was walking and I noticed a basket outside the front of one of the houses.  
The basket contained an array of dog toys and a few leads, with a note marked "Free leads + Toys". Fearing the worst I spent the next couple of days rationalising in my head that it was fine, just that the dog in question had enough toys and leads and it was an exercise in getting rid of some of the old ones that weren't used anymore.
I saw it again last night on my walk and I had to check, just so I could get it off my mind. 
I spoke to my Wife about it and she made a little gift parcel made out of wrapping paper (because she's good at that sort of thing) in which I packed up a few shortbread biscuits.
I knocked on the door, but didn't get a response, so I tried again after my walk this morning and spoke to a lovely lady who assured me that the dog in question was absolutely fine and it was indeed that there were just too many toys and leads and it was time to have a clear out.
As I already had the gift in hand, I gave it anyway in order to generally spread a little cheer.
Since march the level of stress and anxiety has been building up within me. This is understandable. I recently bought a house with my wife, which comes with its own things that need attention, this was my decision and I own that. The current pandemic situation, which is no ones fault, but adds another layer. The addition to that is the workloads that comes from that.
When it all "kicked off" I needed to organise laptops and mobile phones to ensure some 60 staff could work from wherever they were. I was fine with that at the time and got the work done. It was after that when it became apparent that the management paradigm no longer worked, meaning that a lot of processes needed manual intervention from myself. The fact that I was already in the middle of moving all services over to new hardware at the time of lock-down made everything that much more difficult. 
I've been reaching out consistently to management to try and lessen, or at least have the opportunity to sort through to regain some form of visibility again so I could get back to properly planning and managing. Consistently that's been met with either silence or additional work which just serves to add things to an already disorganised pile of work, which I have been trying in vein to organise in my head.
I had a really relaxing weekend, did a lot of fun stuff which involved naps, games and generally relaxing. The house was filled with the smell of Christmas biscuits as my Wife was preparing gifts for the family.
But then Monday morning rolled round, being the first day back in the office. I log in to see another email from my manager with urgent, high priority, needs to be actioned immediately tasks. It seemed this was straw that broke the camels back, I could no longer deal with the anxiety of trying to keep up with other work, like supporting staff with the mails and support tickets that continue to come in, trying to progress project work and provision new hardware in between each high priority email from management. I realised that I was basically trying to fit 8 hours work into 5 hours a day. 
I sent a mail to my manager, signed myself off sick, came home and spent the rest of the afternoon in bed.
I finally got up late-afternoon and did some pottering around, did a few bits and pieces that I needed to do, having to take regular breaks to regenerate spoons. we had dinner and then I spent the evening building a LEGO Darth Vader figure on a twitch live stream which was a lot of fun. A lot of people popped in to chat and wish me well, which made me feel better.
I spoke to my doctor this morning and he signed me off until the 4th of January so I have the next few weeks to try and chill out and hopefully clear my head to the point where I can have a reasonable conversation with my manager about some clear way of dealing with my workload
During this time, there are still a few things that I wish to complete, like finishing off the present purchasing, including wrap and dispatch. In between, I plan on playing games, stream, read, write, and generally try to unplug during the holiday period.

Reading this back, it may seem that this piece is just another opportunity to moan. To whinge about how I am being mistreated. This is not the case. Getting this down is an attempt to offload at least a modicum of the thoughts going around in my head and hopefully this in turn, will reduce some of the stress.

I am aware that lots of you are facing similar issues and to you I say: I hope you're hanging in there, you have the support you need and you are getting sufficient time to relax.
Have a great holiday period, whatever you are doing and lets raise a glass to make 2021 a much less stressful and happy affair.

Monday 17 August 2020

Administering Server core infrastructure.

There still seems to be some apprehension around server core servers.

That supporting core servers requires all work to be executed from the Powershell command line.


Whilst this is entirely possible, for those inclined, I am not one of those people.

I dabble with scripts when I have to, but if/then and for/next loops are not my cup of tea.

Since working in the industry, it has been known that, there are fundamentally 2 ways of working on a server:

  1. connect to the server via a remote desktop connection and administer the roles and services directly on the desktop of the server.

  2. Install RSAT tools to your own desktop and use those tools to connect remotely



Enter RSAT – Remote server administration tools.



RSAT has been around since Vista, if not before.

enables IT administrators to remotely manage roles and features in Windows Server from a computer that is running Windows 10, Windows 8.1, Windows 8, Windows 7, or Windows Vista.

  • from the Microsoft rsat introduction.


For a full list of tools available, see:

https://support.microsoft.com/en-gb/help/2693643/remote-server-administration-tools-rsat-for-windows-operating-systems



Of note, top hits are :

  • Active Directory Certificate Services (AD CS) Tools



  • Active Directory Domain Services (AD DS) Tools



  • DHCP Server Tools



  • DNS Server Tools



So what's the difference between accessing a server remotely that does and doesn't have a GUI?

Practically nothing.



Installing windows server core is the same as installing server with GUI



Its surprising what you can actually run locally on a core server


Not that you ever actually need to log on locally, save for first-time configuration.

This can be done easily with sconfig.exe:



As you can see, a lot of the basic setup needs are right here, from windows updates, to setting network adaptor settings.

As long as 4) Configure Remote Management is enabled, that should be all you need to get going.



The future – Well, not quite.



In April of 2018, Microsoft released the Windows Admin Center.

Now you can remotely manage Windows Server running anywhere—physical, virtual, on-premises, in Azure, or in a hosted environment. The tool, available with your Windows Server license at no additional charge, consolidates and reimagines Windows OS tools in a single, browser-based, graphical user interface. “

-From the data sheet.



This admin centre can be installed locally on an administrators pc, or on a server.

This installs a web server that gives you the web portal and you can add both client machines as well as servers, querying the domain controller directly and connecting to machines via Powershell, presenting the results within the browser.






This the list of options available on a server can be found here:

https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/use/manage-servers


There is the option to add a GUI after the fact, should you have a need.

The process for this is just a web search away.

Why would you wish to add a GUI?

There are a number of use cases that require a GUI, the first one I came into contact with is that Network Policy Server used for Routing and Remote Access requires a GUI to run, but Routing and Remote Access does not, so if you wish to keep the two services separate for contingency purposes this is possible.

Windows Deployment services is another such example.


I have been running the following services quite happily for about 6 months now:

  • Hyper-V
  • Domain controller
  • Routing and Remote Access
  • Certificate Authority
  • SQL Server 2019
  • Volume Licensing

Things that are running with a GUI:

  • Network Policy Server
  • Windows Deployment Services
Its been a learning curve, don't get me wrong, but the resource savings makes it worth it. reduced RAM reliance in may case, by about 2-4 GB per server and storage of 10-14 GB.

Managing virtual guests by Hyper-V manager makes things easier, but Windows admin center makes management even more central.

Have I missed anything or made a mistake? Do you have something you would like to see in the next post?
leave a comment or drop me message.

Sunday 2 February 2020

Making Coffee this morning:

I was absentmindedly making coffee this morning, when a squirrel came to say hi:






The photos were taken and edited on my phone, I may edit the originals on my PC at a later date.

The intention of this post was to document the occasion, but somewhere other than Twitter or Instagram.
I am aware that this is a Blogger site and so is being scrapped by google, but currently that is a lesser evil as already scraping my emails etc.