cPanel custom Dovecot Query to delete email

In cPanel under an email account you can Free up Email Storage. There is a Custom query field which allows you to specify a custom Dovecot query to run. Couple examples below.

Delete email from email address

from sent@email.com

Email that contains a specific string in the message body

body "string to match in message body"

Other useful info
https://wiki2.dovecot.org/Tools/Doveadm/SearchQuery

CPU stuck at 800Mhz or (.78Ghz)

Problem: CPU frequency is stuck at about 780 or 800mhz after waking up from sleep.

What causes the issue? Not sure what causes the issue, but seems to have something to do with unplugging the power adapter while putting to sleep or waking the system when it is pluged in after it was put to sleep on battery. Issue is random.

It appears that this issue can be temporarily resolved by disabling BD PROCHOT using ThrottleStop. Make sure the box is unchecked.

Download ThrottleStop from here

Things to try

Restart computer
Unplug and plug the power adapter in while computer is on
Put to sleep, plug or unplug power adapter, rewake up
Some other combination of the above.

More Info

https://forums.tomshardware.com/threads/laptop-i5-6300hq-cpu-suddenly-underclocking-stuck-at-0-78-ghz.2949019/
https://www.reddit.com/r/Dell/comments/6jecqd/thermal_throttling_idle/

Inkscape – Center objects on page

Select the objects you want to center

Go to Object -> Align and Distribute… or Ctrl + Shift + A

In the right hand side you should get the Align and Distribue box. Make sure that “Treat selection as group” is selected if you want the objects to mantain the distance between themselves.

Hit the “Center on vertical axis” and “Center on horizontal axis”

TFTP firmware to Ubiquiti radio

Boot up radio in tftp mode by pressing the reset button for ~20seconds or till you get the crossing blinky lights.

Enable TFTP
In Windows, search for
“turn windows features on or off”
Open up and select tftp client. Then hit OK.

That should install the tftp client

Flash firmware
To flash the firmware, open up a command prompt and run the tftp command

tftp -i 192.168.1.20 PUT "\Users\bob\Downloads\XM.v6.1.3.31939.171117.1238.bin"

LibreNMS dump devices in MySQL database

All the devices are stored in the librenms datebase devices table.

You can dump all of them with the following command from a shell prompt.

sudo mysql -u librenms  -p librenms -e "select hostname,sysName from devices"

Example output

[jim@localhost ~]$ sudo mysql -p librenms -e "select hostname,sysName from devices"
 Enter password:
 +----------------------------------------+--------------------------------+
 | hostname                               | sysName                        |
 +----------------------------------------+--------------------------------+
 | 192.168.1.1                            | linksys                        |
 | 192.168.1.9                            | wifi-unifi                     |
 +----------------------------------------+--------------------------------+

Unity not loading scene levels

Problem: Game would finish level, but would not load next one.

The issue was that all the levels were not included in the build scene, (File -> Build Settings -> Scenes In Build) so even though the level was correct in PlayMaker, it would not load the level in the Game window while testing.

To add scene to build, open the scene up in the editor, then open the Build Settings from File -> Build Settings… or Ctrl+Shift+B and Add Open Scenes

CHIPSEC notes

The following is some quick notes on using CHIPSEC to compare the EFI whitelist on your current machine with the BIOS Dell provides

Quick notes.

  1. Install prerequisites (Uses python 2)
  2. Git clone Chipsec
  3. Install (Had to use a -i option, is in the manual)
  4. Run (Use spaces like below)

Extract Bios ROM from Dell EXE
Use the BIOS exe to output a .rom file that you can use in Linux. Run the following command from Windows command prompt, accept the security request. Change the EXE to the BIOS you downloaded.

Alienware_17_R2_1.5.0.EXE /writeromfile

The BIOS rom is named dell.rom in the following commands

Get list of Computer ROM

Should create fw.bin file and efilist.json file from local machine

sudo python chipsec_main.py -m tools.uefi.whitelist

Get list from Dell rom

sudo python chipsec_main.py -m tools.uefi.whitelist -a generate efilist.json dell.rom

Compare the current ROM against the one downloaded from Dell

sudo python chipsec_main.py -m tools.uefi.whitelist -a check efilist.json fw.bin

For some reason Ubuntu was not recognizing the last three options after the -a as individual options unless there was a space in between them.  All the examples online show that they had commas between them.  Which should work, so wonder if it was an environment variable problem or something.

The tell tell sign was the [*] Module arguments Line only shows 1 argument, needs 3.

Other links

Install instructions here.
https://github.com/chipsec/chipsec/wiki/Installing-CHIPSEC-in-Linux

LUV Linux download
https://01.org/linux-uefi-validation

Manual
https://github.com/chipsec/chipsec/blob/master/chipsec-manual.pdf

Unity Button can’t access script functions

When you have a button object there is the On Click () area that can execute different actions like a PlayMaker script or a function in a C# script.

Issue with the C# script. You can’t drag and drop the script from the Assets Panel. The script needs to be assigned to an object, then drag and drop that object on the On Click () object. Then select the script and then the function from the drop down there.

Example:

Code snippet below is the EnableDisableAudio function that gets executed by the On Click () function above. Note that the script has to be assigned to an object, in this case the button.

    public void EnableDisableAudio()
    {
        counter++;
        if (counter % 2 == 1)
        {
            Debug.Log("ButtonToggled - On");

        }
        else
        {
            Debug.Log("ButtonToggled - Off");
        }
    }

More info

https://gamedev.stackexchange.com/questions/100995/why-is-c-method-not-showing-up-for-buttons-on-click