Blog: Settings


Add a new blog
May 13

Use /etc/hosts to direct wildcard domain name

You need to set up a DNS server. (install dnsmasq (is light) or bind (is rather heavy)). To install...

Ubuntu OS:

sudo apt-get install dnsmasq

In /etc/NetworkManager/dnsmasq.d/dnsmasq-localhost.conf




sudo /etc/init.d/dnsmasq restart

with Mac OS:

Install dnsmasq

brew update # Always update Homebrew and the formulae first

brew install dnsmasq

sudo brew services start dnsmasq

sudo brew services start dnsmasq

Configure dnsmasq

Its default configuration file is located at /usr/local/etc/dnsmasq.conf and contains examples of

May 5

Fast and easy way to create free logo online in minutes

1. Use to create your ideal logo (you don't need to buy it from them).

2. get your SVG code and paste into any html page.

3. use SVG to PNG tool online with by copying your SVG code url into the SVG to PNG tool online to download your PNG file.

All free, and you will have your free logo in minutes if you

April 17

Remove or revoke DB access or privileges from mysql user both local and remote

Remove or revoke DB access or privileges from mysql user both local and remote:

REVOKE ALL PRIVILEGES ON *.* FROM 'plugins_dbuser'@'localhost';

REVOKE ALL PRIVILEGES ON *.* FROM 'plugins_dbuser'@'%';

April 15

Update a column value, replacing part of a string

here is how we can replace partial of the string on all rows in MySQL: 

UPDATE my_table_name
SET my_field_name = REPLACE(my_field_name, 'unwanted-string', 'new-string');

March 9

Rsync (Remote Sync)

Basic syntax of rsync command

# rsync options source destination

Some common options used with rsync commands

-v : verbose

-r : copies data recursively (but don’t preserve timestamps and permission while transferring data

-a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps

-z : compress file data

-h : human-readable, output

February 9

MySQL - Merge two user groups users into one current group, and delete the second group.

Merge two user groups users into one current group, and delete the second group.
Note: some users might be in both groups already.

# Show users in groupID 111 are also in groupID 222

SELECT user_id FROM user_group 
WHERE user_group_id={111} AND user_id IN (SELECT user_id FROM user_group WHERE user_group_id={222} ) 

# Change user_group_id 222 to 111. Use 'UPDATE IGNORE'  assume user_id & user_group_id are unique index

UPDATE IGNORE user_group 

December 27

Website loading speed tester

Test your website loading speed world wide:

December 6

Git tagging

To create a tag on your current branch, run this:

git tag 

If you want to include a description with your tag, add -a to create an annotated tag:

git tag -a

This will create a local tag with the current state of the branch you are on. When pushing to your remote repo, tags are NOT included by default. You will need

December 6

Git branch

You’ve decided that you’re going to work on feature_12 as an example. To create a new branch and switch to it at the same time, you can run the git checkout command with the -b switch:

$ git checkout -b feature_12
Switched to a new branch "feature_12"

This is shorthand for:

$ git branch feature_12
$ git checkout feature_12

After you are done with

Experteer's Scripting: Coding - Experts Only
Send us a message. We will reply as soon as we can.

Save your professional blogger profile.

Join our blogger group and earn more income.

Sign up Log in