Category Archives: Uncategorized

How to install Pi-Hole on my rPi

First, I should configure rPi.

This is done through download from https://www.raspberrypi.com/software/ – the software is called Raspberry Pi Imager. Selecting Raspbian, without GUI is the first step. Then, I should configure it. I should select SSH access and then set a username/pass. After that, just boot up the rPi – it should work.

ssh to the newly running rPi and install the actual Pi-Hole:
https://docs.pi-hole.net/main/basic-install/

Just select curl based install. It should work. Then, obviously, you should configure it. The pi-hole config file is /etc/pihole/pihole-FTL.conf

; Comments should start with #; to avoid issues with PHP and bash reading this file

PRIVACYLEVEL=0
MAXDBDAYS=7
DBFILE=/mnt/ext/pihole-FTL.db

Reboot and check if everything is working. You can delete the password of the web interface:

pihole -a -p

Next thing is setting the static IP. This is done on the modem – please look it up. And of course, finally, setting as DHCP filter – This is done in the app on the phone – Deco app. Cannot be done through web interface

How to do live streaming on Youtube?

Well, there are plenty of tutorials to do it directly, so I am going to focus on a case, where there are “special circumstances” – like, you want to mix external microphone and your phone, on your computer and send it to Youtube. And of course, this will be quick & dirty.

Prerequisites:

(1) YetiX (https://www.bluemic.com/en-us/products/yeti-x/)

(2) Epoccam (Pro) (https://www.elgato.com/en/epoccam)

(3) OBS (https://obsproject.com)

First, you connect your computer with your phone via Epoccam. With pro version, you can choose how to connect (USB/WiFi), otherwise it autoselects WiFi – may not be useful in scenarios, where you have weak internet around.

Then, you add new devices in OBS (your Yeti and your Epoccam) – name them and turn off every other device which can give you input.

Then, go to studio.youtube.com and create a live event, selecting that you will stream via streaming software – somewhere on the right, you will be able to share the link towards this live stream.

Finally, go to OBS, selecting all the inputs you want, and select start streaming – the menus will take you to manage streaming first, where you will select the one, that you just created.

Warning: you may have to wait for 24 hours in order for streaming facilities of Youtube become available.

How to install Py-torch in your new conda environment

First, change to the environment you want. For me, it is conda activate dlwp

Then, install the basic pytorch:

conda install pytorch torchvision -c pytorch

The recipe is given here: https://pytorch.org/get-started/locally/

Sidenote: if you’re working on ARM (i.e., M1, M2 Mac), you use msp instead of cuda or cpu devices.

Currently (October 2022), mps is supported only in nightly builds of the pytorch.

conda install pytorch torchvision -c pytorch-nightly

How to convert footnotes to bibliography in Word 2016

The procedure is to convert footnotes to bibliography in Word 2016. It is one-time procedure only and usually applies for all the poor souls who are tasked with conversion of the Google Doc files into Word and then PDF files.

The consequences of having the below procedure are: always write your Google Doc documents using footnotes – don’t lose time with any manual numbering of references, etc. However, when writing the footnotes, think about the fact they will become actual references later on – add text as you are required for your explicit referencing style.

Let us start:

a) convert all footnotes to endnotes
Right click on a footnote and say “convert” – then you can convert from footnotes to endnotes and vice-versa. Be sure to check if you are doing this for the whole document.

b) add brackets to your endnotes
Go to Advanced Find and Replace dialog (see how it looks like at the end of this mini tutorial) and for Find search for ^e replacing it with [^&] . There are two possible problems here – CHECK if all references and endnotes at the end of the document indeed acquired brackets. If they didn’t, undo the replacements and go to the first endnote reference in the text. Then try again. The second problem is that you don’t want to repeat this multiple times, as you will end up with several layers of brackets, e.g. [[[]]].

c) change superscript of your endnotes and endnote references to ordinary text
Again go to Advanced Find and Replace and for Find search for [^e] (remember, we just added brackets). For Replacement give simple ^& . However, then you select below under Find, where you can select special Font considerations for your replacement. There, unselect the super and subscript. After that, you should see the following image for your Advanced Find and Replace dialog. If it looks like this, hit Replace all.
Screen Shot 2017-06-29 at 05.58.52

d) remove that endnote separator line

The visual guide is taken from this link: https://uknowit.uwgb.edu/page.php?id=50456

If the link ever gets removed, simply follow these instructions (with some trial and error)

1) switch to draft view

2) go for References tab

3) go for Show notes

4) select “Endnote separator” and delete it

5) switch back to print view