MariaDB installing specific versions

185 days ago

to install a specific MariaDB version:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s — —mariadb-server-version=“mariadb-10.5.22” ;
dnf -y install wget;
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup ;
chmod +x mariadb_repo_setup ;

./mariadb_repo_setup —mariadb-server-version=“mariadb-10.5.22” ;

/usr/bin/dnf —assumeyes install mariadb-server ;

systemctl start mariadb.service ;
systemctl enable mariadb.service ;

https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/

https://www.dbi-services.com/blog/how-to-install-a-specific-version-of-mariadb/

Mark Edwards

,

---

json web tokens (JWT)

223 days ago

export JWT_SECRET_KEY=ABCD ; ## command line!

const jwt = require(“jsonwebtoken”);

const makeToken = (email) => { const expirationDate = new Date(); expirationDate.setHours(new Date().getHours() + 1); return jwt.sign({ email, expirationDate }, process.env.JWT_SECRET_KEY);
};

const myPublicToken=makeToken(‘mark@edwardsmark.com’);

console.log ( jwt.verify( myPublicToken, process.env.JWT_SECRET_KEY) );

Mark Edwards

,

---

smart html elements grid notes

275 days ago

https://www.htmlelements.com/docs/grid-cell-edit/

editor:
{ label: ‘Product’, dataField: ‘productName’, width: 150
, editor: ‘textArea’

, editor: ‘numberInput’
, editor: ‘textArea’
, editor: ‘input’
, editor: ‘autoComplete’
, editor: ‘dropDownList’

label: ‘Date’, dataField: ‘date’, cellsFormat: ‘d’, editor: { template: ‘dateInput’, min: new Date(2022, 5, 1), max: new Date(2022, 10, 1) } editor: ‘timeInput’

Mark Edwards

,

---

Disable CORS policy on chrome

279 days ago

method one:
For Windows:
Open the start menu
Type windows+R or open "Run"
Execute the following command:
   chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
from: https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome

method two:

- RIGHT-CLICK the lock symbol immediately left of the URL
- click “GEAR Site settings” (bottom option)
- scroll down to “Insecure content” (seventh from bottom)
- change “Block” to “Allow”

Mark Edwards

,

---

knex feathers and postman

283 days ago

it appears using postman, and trying to return an object:
    SELECT  JSON_ARRAYAGG
        (       DISTINCT JSON_OBJECT
                (  'myFirstVariable'            ,   `myTable`.`myFirstVariable`
                ,   'mySecondVariable      ,   `myTable`.`mySecondVariable`
                 ) 'JSON_ARRAYAGG'
        )
    FROM                  ........
     ;
BODY—x-www-form-urlencoded does NOT work. just use ordinary params (far left column) instead:
http://192.168.100.225:3030/knex-generic-raw?firstParam=myFirstParam&secondParam=mYSecondParam
Mark Edwards

,

---

« Older

Manage