Change LastPass logout time

Jul 18, 04:57 PM

1 – RIGHT-CLICK LastPass icon (RED square three white dots in the chrome extensions toolbar)

2 – select options (third one down)

3 – General tab (if not already selected)

4 – Log out after this many minutes of inactivity 60 (make sure its checked!)

5 – SAVE button lower right

Mark Edwards

,

---

moving a WP multiuser website to single-user website

Jul 4, 06:08 AM

0) etc.hosts – add ip ## & domain name

1) create a new google-vm or virtualbox-vm with apache, php & mariadb

2) echo ‘‘ > /var/www/html/phpinfo.php ;

3) http://domainName/phpinfo.php — check if page loads

4) create mariadb user:
    CREATE USER ‘WpUser’@‘localhost’ IDENTIFIED BY ‘WpPassword’;

    GRANT ALL ON `WpDb`.* TO ‘WpUser’@‘localhost’	
    IDENTIFIED BY ‘WpPassword’ 							
    WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 
    MAX_USER_CONNECTIONS 0	;

    DROP DATABASE IF EXISTS `wpDb` ; 
   CREATE DATABASE IF NOT EXISTS `wpDb` 			;

    GRANT ALL PRIVILEGES ON `wpDb`.* TO ‘wpUser’@‘localhost’	;

    # test:  mariadb  —host=localhost —user=wpUser  —password=wpPassword  wpDb    ;   

5) wget https://wordpress.org/latest.tar.gz ;

6) gzip —decompress and tar into position
6a) rm -f *.php readme.html ./wc-content/ ./wp-includes/ ./wp-admin/ ;
6b) chown -R apache:apache /var/www/html

7) create new WP site using db info from step two

8) install prime-mover plugin

9) prime-mover import data

10) EXPORT new website using something like all-in-one migration

shared-hosting-cpanel:

1) create LAMP
2) manually install WP
3) install prime-mover plugin
4) import from previous step

EasyWP import: 1) create an EasyWP website

2) use all-in-one to IMPORT the export from step 10.

3) delete google-analytics plugin, some sort of conflict.

Mark Edwards

,

---

running a javascript "module" in the console

Jun 6, 06:30 AM

in this example i use waveSurfer

step one: visit the webpage: about:blank

step two: enter the following code in the console:

var WaveSurfer = null;   // required for creating a global variable.
let script		        = document.createElement('script')		;
script.type		= 'module'				             ;
script.innerText	= `
    import ws from 'https://unpkg.com/wavesurfer.js@beta'; 
    WaveSurfer=ws;
`;
let script		= document.createElement('script')		;
script.type		= 'module'				;
Object.assign(script, 	{innerText } );  // fancy way of assigning a key:value to this object
document.head.appendChild(script);
step three: after waiting a half-second, enter the following code in the console:
const wavesurfer = WaveSurfer.create({
  'container': document.body,
  waveColor: '#4F4A85',
  progressColor: '#383351',
  url: 'https://wavesurfer-js.org//wavesurfer-code/examples/audio/audio.wav',
})
wavesurfer.once('interaction', () => {
  wavesurfer.play()
})
wavesurfer shoudl appear in the browser window.

timeline example:

var WaveSurfer = null;        // required for creating a global variable.
var TimelinePlugin = null;    // required for creating a global variable.
let innerText = `
    import ws from ‘https://unpkg.com/wavesurfer.js@beta’; 
    WaveSurfer = ws;
    import tlPlugin from ‘https://unpkg.com/wavesurfer.js@beta/dist/plugins/timeline.js’;
    TimelinePlugin = tlPlugin;
`;

let script		= document.createElement(‘script’)		;
script.type		= ‘module’				;
Object.assign(script,  { innerText } ); // fancy way of assigning this object a value!
document.head.appendChild(script);
const wavesurfer = WaveSurfer.create({
  ‘container’: document.body,
  waveColor: ‘#4F4A85’,
  progressColor: ‘#383351’,
  url: ‘https://wavesurfer-js.org//wavesurfer-code/examples/audio/audio.wav’,
})
wavesurfer.registerPlugin(TimelinePlugin.create());

wavesurfer.once(‘interaction’, () => {
  wavesurfer.play()
})
Mark Edwards

,

---

MariaDB insert on duplicate key update

May 7, 05:15 AM

it appears that ‘insert on duplicate key update’ will actually create some sort of temporary record then delete it. you can see this in the AUTO_INCREMENT value.

https://mariadb.com/kb/en/insert-on-duplicate-key-update/#:~:text=INSERT%20…,API’s%20CLIENT_FOUND_ROWS%20flag%20is%20set.

DROP TABLE IF EXISTS testTable ;

CREATE TABLE testTable
( nameFirst VARCHAR NOT NULL
, nameLast VARCHAR NOT NULL
, addr VARCHAR NULL
, city VARCHAR NULL
, id INTEGER NOT NULL AUTO_INCREMENT
, UNIQUE KEY (nameFirst, nameLast)
, PRIMARY KEY (id)
);

INSERT INTO testTable SET nameFirst = ‘mark’ , nameLast = ‘edwards’ , addr = ’123 swallow lane’ ;

SELECT * FROM testTable;

INSERT INTO testTable SET nameFirst = ‘pete’ , nameLast = ‘robinson’ , addr = ’246 starling’ , city = ‘oceanside’ ON DUPLICATE KEY UPDATE addr = ’123 swallow lane’ , city = ‘oceanside, ca’ ;

SELECT * FROM testTable;

INSERT INTO testTable SET nameFirst = ‘pete’ , nameLast = ‘robinson’ , addr = ’246 starling’ , city = ‘oceanside’ ON DUPLICATE KEY UPDATE city=‘oceanside, ca’ ;

SELECT * FROM testTable;

INSERT INTO testTable SET nameFirst = ‘lori’, nameLast=‘edwards’, addr = ’948 south third’ ON DUPLICATE KEY UPDATE addr = ’123 swallow ln’, city=‘oceanside’ ;

SELECT * FROM mark ;

INSERT INTO testTable SET nameFirst = ‘lori’, nameLast=‘edwards’, addr = ’948 south third’ ON DUPLICATE KEY UPDATE addr = ’123 swallow ln’, city=‘oceanside’ ;

SELECT * FROM testTable ;

INSERT INTO testTable SET nameFirst = ‘marky’, nameLast=‘edwards’, addr = ’123 swallow lane’ ON DUPLICATE KEY UPDATE addr = ’123 swallow lane’, city=‘oceanside, ca’ ;

SELECT * FROM testTable ;

Mark Edwards

,

---

t o r r e n t s on rocky linux 8

May 3, 06:25 AM

easiest to install: qbittorrent:

dnf install epel-release ;
dnf —assumeyes install qbittorrent ;
dnf —assumeyes install qt5-qtsvg ;
dnf —assumeyes install qbittorrent-nox ;
/usr/bin/qbittorrent-nox —webui-port=12345 ; ## this also gives you the default username/password

https://www.qbittorrent.org/

written from: https://www.linuxbabe.com/redhat/install-qbittorrent-centos-8-rhel-8#comment-961469

second easiest: deluge (but this requires snap)

https://deluge-torrent.org/
https://idroot.us/install-deluge-bittorrent-client-centos-8/ (very helpful)
https://www.linuxhelp.com/how-to-install-deluge-in-centos

could not get installed: ruTorrent

this requires some packages that are no longer available on rocky-linux 8
Mark Edwards

,

---

« Older Newer »

Manage