Category:

Dev

Backing up your Gitea Docker Installation

TL;DR:
docker exec -u git -it -w /data/gitea/backup $(docker ps -qf "name=gitea_server_1") bash -c '/app/gitea/gitea dump -c /data/gitea/conf/app.ini'
The dump will be found in ./gitea/gitea/backup relative to directory containing your docker-compose.yml. You should create this “backup” directory first otherwise you will get a &#… Read more

Navigating to a specific URL in your Angular PWA if its service worker is not yet registered

If you host an Angular Progressive Web App (PWA) on a web server, you will frequently have URLs that are handled by the Angular router to navigate to specific pages within the app.

However, without the service worker registered, navigation requests are not intercepted and sent to the PWA. In other words, if a user has never ran the PWA yet in his or her browser, a… Read more

Casual Events: a free alternative to Meetup

I have released a new app called Casual Events.  Check it out here.

*     *     *

Of all the degeneracy and anti-social behaviour that social media has wrought, Meetup, while not strictly “social media”, is probably one of the more “social” things to emerge from the Internet. Certainly more social than say Facebook or T… Read more

Ionic 4 + Angular 7: Checking whether the generic parent of a component is the active page

There’s no straightforward way yet in getting the parent component of a component via dependency injection without knowing the type of the parent component. This poses a problem if you want your component consumed by many different types of parent components.

A common scenario where this problem occurs is an Ionic 4 app with several pages that use so… Read more

Emulating a POP/IMAP/Activesync mail box for a single domain with Mailgun and Outlook

Skip to the steps

With the termination of Zoho free tier access to POP/IMAP/Activesync services, choices for simple, free inboxes and an outgoing SMTP server for your domain have become virtually non-existent.

A common scenario when hosting a small-scale web service under a domain is to handle registrations by sending out automated mails via the free out… Read more

ngx-translate: translate your JSON file to other languages

For Angular 2/3/4/5/6/7 developers, use this gadget to translate your en.json file.

This is relevant for developers that use @ngx-translate/core similar to the following in app.module:

import { TranslateModule, TranslateLoader } from '@ngx-translate/core';

@NgModule({
/* ... */
  imports: [
    TranslateModule.forRoot({
      loader: {
        provide: Translat
Read more

Ionic 4 Beta: what it means if your Ionic component is not “hydrated” (visibility: hidden rather than visibility: inherit)

Since documentation and StackOverflow answers are currently sparse for Ionic 4, this tip may hopefully help you save a lot of time debugging if you are transitioning a project from Ionic 3 to Ionic 4.

If you discover one of your components is missing the “hydrated” class, a class programmatically applied to Ionic 4 components at run-time (your … Read more

Extortion e-mail scams are on the rise again: the importance of using unique passwords

Have you been getting spam mail that looks like this recently?

I know [password redacted] one of your password. Lets get directly to the purpose. You may not know me and you are most likely thinking why you’re getting this e mail? No one has compensated me to check about you.

Well, I installed a software on the xxx vids (sex sites) web-site and you know what

Read more

Angular 2/3/4/5: change detection on data-bound array push/unshift, pop/shift or splice

Suppose you have a component and have bound an array variable to an input property, like so:

<myComponent [arrayInput]="myArray"></myComponent>

Suppose you were to modify the contents of myArray via its standard array methods such as push(x), pop(), unshift(x), shift(), or splice(i, c). You may notice that myComponent does n… Read more

Solr 7: match exactly one TextField, fuzzy search the others

Disclaimer: I just recently started tinkering with Solr, so this may not be the “textbook” solution to this problem — but it works!

Say you wish to categorize your documents in a hierarchy. For example, you want to have a pet search engine, and you want to bucket the pets accordingly:

Dog (mammal)

Dogs are domesticated mammals, not natural w

Read more