terminal – PHPUnit always output “No tests executed!” on MacOS Big Sur

When trying to run any PHPUnit tests, I always get a No tests executed! message on my MacOS machine. A simple way to reproduce, on this specific machine, is to install a fresh instance of Laravel and running the default tests :

$ composer create-project --prefer-dist laravel/laravel blog
$ cd blog
$ vendor/bin/phpunit

=> No tests executed!

The expected output would be OK (2 tests, 2 assertions).

As far as I know, this is not a PHPUnit configuration issue since the default Laravel code is expected to work, the same issue appear with other framework and any code I try, the same issue is present with different PHPUnit version (8.5 and 9.4) and the exact steps listed above return the expected output inside an Ubuntu VM as well as on another Mac running Catalina.

Actually, I suspect it is not a PHPUnit issue, but more of a MacOS issue or a PHP configuration issue, one that could manifest in other form later with another tool or project.

PHPUnit used to work fine on this machine, but it’s been a couples weeks/months I didn’t actually used it. The only thing that changed since I last (successfully) used any PHPUnit on this Mac as been upgrading to MacOS Big Sur and installing (then uninstalling) Homebrew.

The issue appears PHPUnit can’t find any testsuite. Running vendor/bin/phpunit --testsuite Unit still output No tests executed! while, inside a fresh Laravel install, should output Ok (1 test, 1 assertion).

So my question is : Is there anything else I can try to fix this before doing a fresh install of macOS Big Sur, and is anyone having the same issue?

python – Printing colourful text to terminal

colors.py

type_error = "Expected an int or str type but given {} type"


def _condition_for_int(color):
    return (isinstance(color, int) and (color >= 0 and color < 256)) or (
        color.isnumeric() and (int(color) >= 0 and int(color) < 256)
    )


class Color:
    accepted_color_alias = {
        "black",
        "red",
        "green",
        "yellow",
        "blue",
        "magenta",
        "cyan",
        "white",
    }
    RESET = "33(0m"


class FontColor(Color):
    """
    Font color class
    """

    black = "33(30m"
    red = "33(31m"
    green = "33(32m"
    yellow = "33(33m"
    blue = "33(34m"
    magenta = "33(35m"
    cyan = "33(36m"
    white = "33(37m"

    @classmethod
    def get_color(self, color, value="", add_reset=True):
        if not isinstance(color, (int, str)):
            raise TypeError(type_error.format(type(color).__name__))

        _reset = self.RESET * add_reset

        if _condition_for_int(color):
            return "33(38;5;{}m{}{}".format(color, value, _reset)

        if color not in self.accepted_color_alias:
            raise ValueError("Unknown color given {}".format(color))
        return getattr(self, color) + str(value) + _reset


class BackgroundColor(Color):
    """
    Background colors class
    """

    black = "33(40m"
    red = "33(41m"
    green = "33(42m"
    yellow = "33(43m"
    blue = "33(44m"
    magenta = "33(45m"
    cyan = "33(46m"
    white = "33(47m"

    @classmethod
    def get_color(self, color, value, add_reset=True):
        if not isinstance(color, (int, str)):
            raise TypeError(type_error.format(type(color).__name__))

        _reset = self.RESET * add_reset

        if _condition_for_int(color):
            return "33(48;5;{}m{}{}".format(color, value, _reset)

        if color not in self.accepted_color_alias:
            raise ValueError("Unknown color given {}".format(color))

        return getattr(self, color) + str(value) + _reset


class FontStyle(Color):
    """
    Font style class
    """

    bold = "33(1m"
    italic = "33(3m"
    underline = "33(4m"

    @classmethod
    def get_style(self, style, value="", add_reset=True):
        if not isinstance(value, str):
            raise TypeError("Only str type allowed")

        return getattr(self, style) + value + self.RESET * add_reset


#s = f'{FontColor.get_color("red", "STOP")} {BackgroundColor.get_color("cyan", "danger")}'
# print(s)
# print(FontStyle.get_style('underline', 'HEllO'))

Output from the commented lines at the end of the file
         

utils.py

from colors import Color, FontStyle, FontColor, BackgroundColor
import sys
from time import sleep


def cprint(
    text,
    color=None,
    background=None,
    bold=False,
    italic=False,
    underline=False,
    end="n",
):
    """
    prints the given text to stdout with color `color`
    and `background` resets back to normal after printing.
    Supported colors are 'black', 'red', 'green', 'yellow',
    'blue', 'magenta', 'cyan', 'white'.
    """

    _reset = Color.RESET
    bg = "" if background is None else _set_background(background)
    font_color = "" if color is None else _set_color(color)
    font_style = _set_font_style(bold=bold, italic=italic, underline=underline)
    output_style = bg + font_color + font_style
    sys.stdout.write(output_style)
    sys.stdout.write(text)
    sys.stdout.write(_reset + end)


def _set_color(color):
    """
    For setting color of the cursor with `color`.
    Accepted colors alias are 'black', 'red', 'green',
    'yellow', 'blue', 'magenta', 'cyan', 'white'.
    Can also gives an values between 0 to 255.
    Check `get_color_codes()` for more info.
    """

    return FontColor.get_color(color, add_reset=False)


def _set_background(color):
    """
    Returns the background of the cursor with color
    `color` ansi esacape code. Accepted colors alias are
    'black', 'red', 'green','yellow', 'blue', 'magenta',
    'cyan', 'white'. Can also gives an values between 0 to 255.
    """

    return BackgroundColor.get_color(color, add_reset=False)


def _set_font_style(**styles):
    return "".join(
        (
            FontStyle.get_style(style, add_reset=False)
            for style, cond in styles.items()
            if cond
        )
    )


def get_color_codes(animation=False, background=False):
    """
    prints color codes in it's respective color,
    used for visual reference.
    """

    ansi_code = "33(48;5;{}m{}" if background else "33(38;5;{}m{}"
    v = 0.1 if animation else 0
    for i in range(32):
        for j in range(8):
            sleep(v)
            code = str(i * 8 + j)
            sys.stdout.write(ansi_code.format(code, code.ljust(4)))
            sys.stdout.write("33(0m")
        sys.stdout.write("n")


#cprint("hello world", color="123", bold=True, italic=True)

# get_color_codes(background=True)

The output from commented lines at the end of the file

terminal – Remove Chrome Policy. Error: Domain (com.google.Chrome) not found

My Chrome browser is managed by organisation. This was intentional since in my previous company we used one extension for work. Thus, this is not a malware issue.

I cannot remove this policy now. I tried with following from terminal:

defaults delete com.google.Chrome ExtensionInstallForcelist

The error I get is:

Domain (com.google.Chrome) not found.
Defaults have not been changed.

These are my Policies at the moment:

ExtensionInstallForcelist is the one I want to be removed.

I also tried the Chrome Policy remover for Mac as explained here:
https://support.google.com/chrome/thread/6453928?hl=en

However this is not doing anything. I tried few times, installed even signed Apple version of this tool, restarted laptop, tried from terminal, I reseted Chrome settings after it… nothing.

Any help is appreciated!

terminal – Creating an alias for Python in bash/zsh

I have often seen people recommending to setup an alias in one’s .bash_profile or .zshrc along the lines of

alias python='python3'

This seems like a convenient idea, however, as far as I understand, python2 is still installed for compatibility reasons, so won’t creating such an alias break certain things?

networking – Need a step by step guide to create a working BIND9 DNS server using only the terminal

I’m a freshman in Computer Science and just got assigned a task from the title. The problem is that the teacher told us nothing about how to do it. He spent 8 hours showing us how to create directories, writing to text files, changing directory etc. and literally nothing else after which he told us to configure a server. No one in my group knows anything about any of this. None of us have ever worked with Linux and we have never taken any networking classes. No one knows what to do. It is ridiculous and I need help.

I need a step by step guide to blindly follow. I do not have time to learn it properly (I already study 10h+ a day) and this subject is about to end anyway (1 meeting left). I just need to pass it by doing two more assignments (or doing one really really well) and this is one of them. I’m desperate please help.

PC Games – BloodRayne – Terminal Cut + BloodRayne 2 – Terminal Cut [GOG] | NulledTeam UnderGround

BloodRayne – Terminal Cut + BloodRayne 2 – Terminal Cut (GOG) | Size :11.22 GB
Title: BloodRayne 2: Terminal Cut
Date:20 Nov, 2020
Developer :Terminal Reality
Publisher : Ziggurat
Genre : :Action​

About This Game:

Enhanced and updated for modern systems, this is the definitive edition of Rayne’s second adventure: a blood-soaked rampage of vengeance against the Cult of Kagan, a group led by Rayne’s half-siblings that seek to carry out their father Kagan’s legacy by creating a new era of vampire supremacy.

ScreenShoot

System Requirements :
OS: Windows 8.1 or higher
Processor: Intel 4th Generation Core i3, i5, i7
Memory: 2 GB RAM
Graphics: Intel HD Graphics 520 or higher
Storage: 15 GB available space
Additional Notes: Optimized for XInput controllers (Xbox 360, Xbox One)

Game intro in Youtube

Download Links

.(tagsToTranslate)xenforo(t)xenforo themes(t)xenforo nulled(t)xenforo free(t)xenforo 2.2(t)nulled(t)nulled script(t)whmcs(t)whmcs nulled(t)scripts(t)nulled scripts(t)vbulletin(t)vbulletin nulled(t)vbulletin 5 nulled(t)xenforo resources(t)wordpress download(t)wordpress nulled forum

terminal – How to get rid of phantom directories /Volumes on a Mac?

I have a couple of different but related problems. 1st, I have an AppleScript that can mount only 10 of my 13 volumes. The 3 I cannot mount are named Data 1, Data 2, and Data 3. I renamed those 3 volumes and now my Applescript can mount all of them. Using AppleScript I executed set mountList to do shell script "ls /Volumes. When I displayed mountList, it correctly listed my 13 volumes (with the 3 new names). In AppleScript, I set thisDisk to “Data 1”. When I executed if thisDisk is in mountList then display dialog thisDisk, a Mac window displayed Data 1 even though there is no longer a volume named Data 1. Somehow, Data 1 both is, and is not, in the list of volumes. I think this conflict is why I had to change its name. How do I get rid of the phantom volumes Data 1, Data 2, and Data 3? I have volumes named Photo Data 1 (and 2 and 3) and I have no problem with them, so this problem is not related to the spaces in the names. Also, the Applescript used to work perfectly but I just erased some hard disks and created partitions using some of the erased names.

Second Problem. In Terminal when I execute ls /Volumes, it correctly lists the 13 volumes (with the 3 new names) but it includes a volume I no longer have named TTSS. How do I get rid of the phantom TTSS? I executed ls -l / grep Volumes and it tells me drwxrwxrwx+ 3 root wheel 96 Nov 17 2018 TTSS

I should mention that I barely understand terminal commands and AppleScript, so I will probably need step-by-step help.

java – JDK wont run in terminal and this is preventing me from downloading eclipse

i am able to download the latest JDK from oracle. When i install it, it says successfully installed. However, when i go into my terminal and type java -version this is what i get

Error: dl failure on line 558 Error: failed /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/lib/server/libjvm.dylib, because dlopen(/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/lib/server/libjvm.dylib, 10): no suitable image found. Did find: /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/lib/server/libjvm.dylib: code signature invalid for ‘/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/lib/server/libjvm.dylib’

devin-MacBook-Air:~ devin$

productivity – Monitor your terminal / file change activity

I’m trying to monitor all my activity to optimize productivity and I’m wondering if a system already exists to do so or how to set one up otherwise.

For example, I want to record the programs I execute on the command line and then track the diffs to my files to see how many times I run certain tests and patterns of test updates and code rewriting.

Essentially, I just want to track what I’m doing and figure out how to do it faster.

One hypothesis is that the 2 seconds it takes to run my unit test actually turns into 20 seconds on average because I forget what I was going to do depending on the test output.

Any ideas on how to set this up?

PC Games – BloodRayne 2 – Terminal Cut [FitGirl Repack] | NulledTeam UnderGround

BloodRayne 2 – Terminal Cut (FitGirl Repack) | Size :4.77 GB
Title: BloodRayne 2: Terminal Cut
Date:20 Nov, 2020
Developer :Terminal Reality
Publisher : Ziggurat
Genre : :Action​

About This Game:

Enhanced and updated for modern systems, this is the definitive edition of Rayne’s second adventure: a blood-soaked rampage of vengeance against the Cult of Kagan, a group led by Rayne’s half-siblings that seek to carry out their father Kagan’s legacy by creating a new era of vampire supremacy.

ScreenShoot

System Requirements :
OS: Windows 8.1 or higher
Processor: Intel 4th Generation Core i3, i5, i7
Memory: 2 GB RAM
Graphics: Intel HD Graphics 520 or higher
Storage: 15 GB available space
Additional Notes: Optimized for XInput controllers (Xbox 360, Xbox One)

Game intro in Youtube

Download Links

.(tagsToTranslate)xenforo(t)xenforo themes(t)xenforo nulled(t)xenforo free(t)xenforo 2.2(t)nulled(t)nulled script(t)whmcs(t)whmcs nulled(t)scripts(t)nulled scripts(t)vbulletin(t)vbulletin nulled(t)vbulletin 5 nulled(t)xenforo resources(t)wordpress download(t)wordpress nulled forum