to load underscore (or any cdn) into javascript:
var cdn = ‘https://code.jquery.com/jquery-3.2.1.min.js’ ;
var cdn = “https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js” ;
var cdn=‘https://cdnjs.cloudflare.com/ajax/libs/deepstream.io-client-js/2.1.2/deepstream.js’ ;
var jq = document.createElement(‘script’); jq.src=cdn;
document.getElementsByTagName(‘head’).appendChild(jq);
awesome way to use underscore to look up value in an object:
// _master is the object, sequelizeId is the index
console.log( _.findIndex(_master, (_tmpRow)=> { return _tmpRow.sequelizeId === ‘123456’ }) );
// 2017-09-26:
// https://stackoverflow.com/questions/37933445/underscore-js-find-object-which-contains-value-in-array
var master = [ { ‘name’ : ‘listOne’ , data : [ ‘nameOne’,‘nameTwo’] }
, { name: ‘listTwo’, ‘data’ : [ ‘nameThree’, ‘nameFour’ ] }
]
function findMe(myObj, myKey) {
var retVal=null;
_.each(myObj, (val)=> {
var byeBye = _.indexOf(val.data, myKey );
if ( _.indexOf(val.data, myKey ) > -1 ) {
retVal=val.name;
}
})
return retVal;
}
console.log( ‘RESULT: ‘ + findMe(master, ‘nameTwo’) )
1) FULL state name, no appreviation
2) organization name – no special characters
3) dont skip the “common name” – which is the domain name
openssl req -newkey rsa:2048 \
-keyout 800-language.com-WITH-PASSPHRASE.key \
-out 800-language.com.csr ;
Generating a 2048 bit RSA private key
…………………………………………………………………………….+++
…+++
writing new private key to ’800-language.com-WITH-PASSPHRASE.key’
Enter PEM pass phrase:
Verifying – Enter PEM pass phrase:
——-
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
——-
Country Name (2 letter code) [XX]:US
State or Province Name (full name) []:North Carolina
Locality Name (eg, city) [Default City]:Raleigh
Organization Name (eg, company) [Default Company Ltd]:800 Language
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:800-language.com
Email Address []:info@comptonpeslonline.com
Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
CREATE TABLE `sequelizeTable` (
`sequelizeName` varchar(50) DEFAULT NULL,
`sequelizeAddress` varchar(50) DEFAULT NULL,
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`createdAt` date DEFAULT NULL,
`updatedAt` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
—
— Dumping data for table `sequelizeTable`
—
INSERT INTO `sequelizeTable` VALUES
( ‘lori edwards’ , ’948 south third street’ ,1 , ’2017-01-01’ , NULL )
, ( ‘mark edwards’ , ’123 swallow lane’ ,2 , ’2017-01-01’ , NULL )
, ( ‘marjorie edwards’ , ’7366 east ironwood court’ ,3 , ’2017-01-01’ , NULL )
;
const Sequelize = require(‘sequelize’);
const util = require(‘util’);
// mysql —host=localhost —user=jsonTestUser —password=jabberwolky exampleDb ;
var sequelize = new Sequelize(‘exampleDb’, ‘jsonTestUser’, ‘jabberwolky’, {
host: ‘localhost’,
dialect: ‘mariadb’,
pool: {
max: 5,
min: 0,
idle: 10000
}
});
// create table sequelizeTable ( sequelizeName VARCHAR, sequelizeAddress VARCHAR, id mediumint not null auto_increment, primary key (id) ) ;
var sequelizeTable = sequelize.define(‘sequelizeTable’, {
sequelizeName: {
type: Sequelize.STRING,
field: ‘sequelizeName’ // Will result in an attribute that is firstName when user facing but first_name in the database
},
sequelizeAddress: {
type: Sequelize.STRING
},
id: {
type: Sequelize.INTEGER,
primaryKey: true
}
}, {
freezeTableName: true // Model tableName will be the same as the model name
});
sequelizeTable.findAll({
where: {
id: 1,
sequelizeName: ‘lori edwards’
}
,order: [ ‘id’ ]
,attributes: [‘sequelizeName’,‘sequelizeAddress’,‘id’]
}).then( (returnedValue) => {
//console.log(
JSON.stringify(returnedValue ));
returnedValue.forEach ( © => {
var seconds = new Date() / 1000;
//console.dir(c.toJSON() );
console.dir(c.sequelizeName );
console.log(c.sequelizeAddress );
sequelizeTable.update(
{ sequelizeAddress : c.sequelizeAddress + ‘ ‘ + seconds } ,
{ where : { id: c.id } }
)
.then( (result) => {
console.log(result) ;
})
.catch( (err) => {
console.log(‘err: ‘ + err) ;
})
;
})
});
to rename comptonpesltrainers website login page , it is at the very BOTTOM Of the FIRST option settings page!
NOTE: this one (not in picture) is part of all-in-one-security.
————————————————————
Please enter an answer in digits:
thirteen + seven =
————————————————————-
also, see note at bottom about using ASH-recaptcha – it might have a conflict with all-in-1 security!

ASH-recaptcha did not work – use this one by Jorn Lund instead
NOTE: on google-cloud, dont forget to set firewall rules!
sudo yum —assumeyes update;
sudo yum —assumeyes install httpd;
sudo systemctl start httpd ;
sudo systemctl enable httpd ;
sudo systemctl status httpd ;
vi /etc/httpd/conf/httpd.conf ;
Find the section and change AllowOverride None to AllowOverride All
AllowOverride All
and add this line:
LoadModule rewrite_module modules/mod_rewrite.so
and finally:
sudo systemctl restart httpd ;
P H P — A P A C H E S T U F F :
yum —assumeyes install php-pdo ;
yum —assumeyes install php-pdo_mysql ;
service httpd restart ;
- had to do the following on 123systems.net:
yum —assumeyes install firewalld ;
systemctl unmask firewalld ;
systemctl enable firewalld ;
systemctl start firewalld ;
firewall-cmd —permanent —add-port=80/tcp ;
firewall-cmd —get-active-zones ;
firewall-cmd —zone=dmz —add-port=80/tcp —permanent ;
firewall-cmd —get-active-zones ;
firewall-cmd —reload ; ### do NOT forget this step !
- OPTIONAL OPTIONAL – otherwise you can see the “default” apache page
cat </var/www/html/index.html ;
this is a test to see if apache is indeed working
END
now try the IP ## in your browser.
cat </var/www/html/phpinfo.php;
END
- INSTALL PHP:
yum —assumeyes install php php-pear php-mysql ; ## current default centos version, might be old
systemctl restart httpd.service ; ## dont skip this step (again)!