Skip to content

Instantly share code, notes, and snippets.

View Yiannistaos's full-sized avatar
🏠
Working from home

Yiannis Christodoulou Yiannistaos

🏠
Working from home
View GitHub Profile
@Yiannistaos
Yiannistaos / yarn test test_output.md
Last active February 21, 2024 14:43
This gist includes commands for saving yarn test outputs and counting any console.error or console.warn messages

Commands for saving yarn test outputs and counting any console.error or console.warn messages.

This gist provides commands for capturing and analyzing the output of your JavaScript testing process using yarn test. The first command saves all output from the test run, including both standard output and error messages, to a file named test_output.txt. This is useful for reviewing all feedback from the test process. The second command filters this output to count how many lines contain either console.error or console.warn, helping you quickly assess the number of errors or warnings generated during your tests. This approach is valuable for identifying potential issues in your codebase by focusing on explicit error and warning logs.

Save all test output to a file

yarn test >test_output.txt 2>&1

Save all test errors and warnings to a file

grep -E "console.error|console.warn" test_output.txt | wc -l

@Yiannistaos
Yiannistaos / gist:8e955d8f772b91508896cc8ca7d31e1c
Created November 24, 2023 15:40
Fix Unknown column 'a.ordering' error after upgrade from Joomla! 4.4 to Joomla! 5

Fix Unknown column 'a.ordering' error after upgrade from Joomla! 4.4 to Joomla! 5

Unknown column 'a.ordering' in 'order clause'

Unknown column 'a.ordering' in 'order clause'
$results = $db->setQuery($query)->loadObjectList();

Solution:

@Yiannistaos
Yiannistaos / React Native Development: Technical Requirements & Accounts.md
Last active November 1, 2023 08:59
React Native Development: Technical Requirements & Accounts

React Native Development: Technical Requirements & Accounts

1. Development Environment Setup

a. React Native CLI

b. IDE (Integrated Development Environment)

@Yiannistaos
Yiannistaos / Integrating Firebase with React Native.md
Last active October 27, 2023 12:44
Integrating Firebase with React Native

Integrating Firebase with React Native

Step-by-Step Guide to Integrating Firebase with Your React Native Application

Investigate is in 90%. It will be finished in the first week of November 2023.

Live CMS (This demo has been made for demonstration purposes only)

What is Firebase?

@Yiannistaos
Yiannistaos / Source Tree Example (markdown).md
Created October 19, 2023 14:03
Source Tree Example (markdown)

Source Tree Example (markdown)

src
├── App.tsx
├── ui
│   └── hooks
│   │   └── index.tsx
│   ├── components
│   │   └── common
│ │ │ └── index.tsx
@Yiannistaos
Yiannistaos / Firebase Messaging.md
Last active October 27, 2023 12:44
Integrating Firebase with React Native

Integrating Firebase with React Native

Step-by-Step Guide to Integrating Firebase with Your React Native Application

Investigate is in 90%. It will be finished in the first week of November 2023.

Live CMS (This demo has been made for demonstration purposes only)

What is Firebase?

@Yiannistaos
Yiannistaos / Firebase Investigation.md
Last active October 10, 2023 07:20
Firebase Investigation

Firebase Investigation - Yiannis Christodoulou (Sep-Oct 2023)

Firebase Notifications (FCM - Firebase Cloud Messaging)

  1. Research Firebase Cloud Messaging capabilities and limitations: Understand the key features and constraints of Firebase Cloud Messaging for mobile notifications. (3d)

  2. Set up Firebase project and integrate with React Native app: Walkthrough on setting up a new Firebase project and linking it to the React Native application. (2d)

  3. Implement Firebase SDK in React Native: Ensure that the Firebase SDK is properly integrated into the React Native app for push notifications.

@Yiannistaos
Yiannistaos / cpnb-redirect-the-user-after-reject.js
Created January 25, 2022 11:00
Redirect the User to another page or close the page after clicking on the reject button with the Web357 Cookies Policy Notification Bar Joomla! Plugin
<script type="text/javascript">
/**
* TRIGGER EVENTS
* Trigger events for the Cookies Policy Notification Bar Joomla! Plugin by Web357
* cpnb-trigger-events-web357.js
*/
window.addEventListener('load', function ()
{
setTimeout(() => {
var cpnb_decline_btn = document.getElementById("cpnb-decline-btn");
@Yiannistaos
Yiannistaos / ellinika-kefalaia-xoris-tonous.js
Last active January 18, 2022 12:07
Προσθέτουμε τον παρακάτω js κώδικα στο head της σελίδας μας, και πετυχαίνουμε Ελληνικά κεφαλαία χωρίς τόνους. Παράδειγμα: από ΓΙΆΝΝΗΣ θα γίνει αυτόματα ΓΙΑΝΝΗΣ, χωρίς να χρειαστεί να αλλάξουμε την value του text-transform στο css μας.
<script>
(function(e) {
e.extend(e.expr[":"], {
uppercase: function(t) {
var n = e(t).css("text-transform");
return typeof n !== "undefined" && n === "uppercase"
},
smallcaps: function(t) {
var n = e(t).css("font-variant");
return typeof n !== "undefined" && n === "small-caps"
@Yiannistaos
Yiannistaos / wholesale-suite-wordpress-plugin-compatibility.php
Last active January 12, 2022 12:44
The Login as User WordPress Plugin is now compatible with the Wholesale Suite WordPress Plugin
<?php
/**
* BEGIN: Web357 Login as User WordPress Plugin
* The Login as User WordPress Plugin is now compatible with the Wholesale Suite WordPress Plugin
* Allow shop managers to Login as Wholesale Customer
* Add the code below in the functions.php of your current theme
*/
/* Lets Shop Managers have the capability of editing and promoting users */
add_action( 'admin_init', 'wws_add_shop_manager_user_editing_capability');
function wws_add_shop_manager_user_editing_capability() {