Skip to content

Instantly share code, notes, and snippets.

View WisdomSky's full-sized avatar
💭
Working from Home

Pao Dayag WisdomSky

💭
Working from Home
View GitHub Profile
@WisdomSky
WisdomSky / README.md
Last active July 4, 2024 22:59
Fix Aniwatchto.com image posters not loading

Cause:

The address img.flawlessfiles.com failed to be resolved by any DNS providers. This could be due to expired domain.

Fix

Update the hosts in your PC to forcefully resolve the following domain:

img.flawlessfiles.com

@WisdomSky
WisdomSky / text-to-regional-indicator.md
Created February 14, 2024 13:38
Convert Alphabet Text Into Regional Indicator Unicode Character Using Javascript

Code

function alphaToRegionalIndicator(text) {

    text = text.toLocaleUpperCase().split('');

    let output = "";
@WisdomSky
WisdomSky / README.md
Last active July 4, 2024 04:59
Install Laravel from Git Bash + Docker

1.) Set target directory

export LARAVEL_APP=laravel

The value of LARAVEL_APP will be the name of the directory where the laravel app will be created relative to your current working directory in git bash.

2.) Install Laravel via Docker

docker run --rm \
 --pull=always \
@WisdomSky
WisdomSky / README.md
Created September 6, 2023 16:31
Update cloudflared-web docker image
  1. Open the cloudflared-web WebUI and back-up the token by copying it and pasting it temporarily somewhere.

  2. Get cloudflared-web container id:

sudo docker ps
  1. Stop and remove the cloudflared-web container:
sudo docker stop 
@WisdomSky
WisdomSky / How to Back-up the docker-compose.yaml file of a CasaOS app via SSH or CLI.md
Created August 9, 2023 12:07
How to Back-up the docker-compose.yaml file of a CasaOS app via SSH or CLI

Generating the docker-compose.yaml file:

  1. Retrieve the app id of the target CasaOS app you wanted to back-up the docker-compose.yaml:

You can do this by opening the app settings of the target app, and at the top of the settings window, it should show the app's id:

image

In the sample screenshot above, the app id of the app I want to backup is linuxserver-plex.

@WisdomSky
WisdomSky / How to change CasaOS UI port via SSH or CLI.md
Last active July 9, 2024 23:22
How to change CasaOS UI port via SSH or CLI

The basic CasaOS UI config is located in /etc/casaos/gateway.ini which includes the port where the Web UI is running.

To change the port where CasaOS UI is running via CLI, you have to edit the gateway.ini file:

sudo vi /etc/casaos/gateway.ini

For example, I changed the port into 90:

image

@WisdomSky
WisdomSky / automatic-component-registration.js
Created August 31, 2020 14:37
Automatically registers all(except App.vue) vue components inside the components directory
const components_req = require.context('./components', true, /^(.*\.(vue))[^.]*$/im);
const components = components_req.keys().reduce(function(acc, key){
const name = key.replace(/^.*\/([^\.]+)\.vue/,'$1');
if (name !== 'App') {
let comp = components_req(key);
acc[name] = comp.default && comp.__esModule ? comp.default : comp;
}
return acc;
}, {});
@WisdomSky
WisdomSky / README.md
Last active October 30, 2024 09:31
Signal Server Installation v1.88 Full Guide

# Requirements

  • Java 11
  • Maven
  • Redis
  • PostgreSQL
@WisdomSky
WisdomSky / wp_get_nav_menu_items_hierarchy
Created April 20, 2015 09:20
Sorts the results returned by Wordpress' wp_get_nav_menu_items() function into a hierarchichal multi-dimensional array.
/*
* you can use this function just like the way you use wp_get_nav_menu_items() in wordpress
*
*/
function wp_get_nav_menu_items_hierarchy($menu,$args=null){
$arr = array();
function _inject_child($id,$item,&$list){