Hidup Tanpa Khawatir dengan Tuhan Yesus Kristus. Iman . Tentang Makanan dan Baju.

Apakah kita khawatir tentang makanan atau pakaian? Apa Kata Tuhan Yesus tentang Makanan atau Pakaian? Mari kita lihat apa yang dikatakan Tuhan Yesus.

Tuhan Yesus pertama memulai dengan mengatakan Matius 6:24 Tak seorang pun dapat mengabdi kepada dua tuan. Karena jika demikian, ia akan membenci yang seorang dan mengasihi yang lain, atau ia akan setia kepada yang seorang dan tidak mengindahkan yang lain. Kamu tidak dapat mengabdi kepada Allah dan kepada Mamon.”

Continue reading “Hidup Tanpa Khawatir dengan Tuhan Yesus Kristus. Iman . Tentang Makanan dan Baju.”



第一任主耶稣说 马太福音 6:24 “一個人不能服事兩個主人;他若不是恨這個愛那個,就是忠於這個輕視那個。你們不能服事 神,又服事金錢(“金錢”亞蘭文是“瑪門”)。

Continue reading “与主耶稣基督无忧的生活。信念。关于食物和布料。”

Life Without Worry with Lord Jesus Christ. Faith . About Food and Cloth.

Do we worry about food or cloth ? What Lord Jesus Said about Food or Cloth ? Let us see what Lord Jesus said.

First Lord Jesus said Matthew 6:24  “No one can serve two masters; for either he will hate the one and love the other, or else he will be loyal to the one and despise the other. You cannot serve God and mammon.

Continue reading “Life Without Worry with Lord Jesus Christ. Faith . About Food and Cloth.”

CentOS 8 / Redhat 8 install wordpress with let's encrypt ssl https.

Set Current Hostname :

hostnamectl set-hostname example.com
hostnamectl restart systemd-hostnamed

Install EPEL release

yum -y install epel-release

Install httpd mod_ssl php and mariadb server database

yum -y install php php-mysqlnd php-json mod_ssl httpd mariadb-server

Enable httpd and mariadb server database

systemctl enable mysqld
systemctl enable httpd
systemctl start mariadb httpd

Configure Mariadb Secure Installation


Configure User WordPress and database

# mysql -u root -p
Enter password:
## Create database ##
## Creating new user ##
CREATE USER wordpress@localhost IDENTIFIED BY "change_this";
## Grant privileges to database ##
GRANT ALL ON wordpress.* TO wordpress@localhost;
## FLUSH privileges ##
## Exit ##

Configuring Firewalld to open traffic for http and https

yum -y install firewalld
firewall-cmd –zone=public –permanent –add-service=http
firewall-cmd –zone=public –permanent –add-service=https

Install https ssl letencrypt

wget https://dl.eff.org/certbot-auto
mv certbot-auto /usr/local/bin/certbot-auto
chown root /usr/local/bin/certbot-auto
chmod 0755 /usr/local/bin/certbot-auto

Edit SSL.conf /etc/httpd/conf.d/ssl


DocumentRoot /var/www/html/wordpress


cd /var/www/html
wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
chown -R apache:apache wordpress
rm -rf latest.tar.gz

Point your browser to https://domain.com and follow the instruction. 🙂

Python Fast Boot Camp For Dummies , Understanding Variable , numbers, tuple , list , dictionary , python data structure.

What is variable ?

Variable is a label for a location in memory . Variable make us easy to understand as programmer.

Python has five standard data types −

  • Numbers
  • String
  • List
  • Tuple
  • Dictionary

Let’s take a look on each of them.

Number Data Type in Python

Python supports integers, floating point numbers and complex numbers. They are defined as intfloat and complex class in Python.

# note variable is always at the left and we assign it with = to something like integer and float
# example we name our variable i for integer and f for float
i = 7
f = 3.5
# print the value of i and f to command prompt
print (i)
print (f)
# we can use type function to determine what is variable i and f is
print (type(i))
print (type(f))
## We can covert between the type to by using int and float function
print (float(i))
print (int(f))

Below are example of number type.

Number SystemPrefix
Binary‘0b’ or ‘0B’
Octal‘0o’ or ‘0O’
Hexadecimal‘0x’ or ‘0X’

Complex numbers are an extension of the familiar real number system in which all numbers are expressed as a sum of a real part and an imaginary part. Imaginary numbers are real multiples of the imaginary unit (the square root of -1), often written i in mathematics or j in engineering. Python has built-in support for complex numbers, which are written with this latter notation; the imaginary part is written with a j suffix, e.g., 3+1j. To get access to complex equivalents of the math module, use cmath. Use of complex numbers is a fairly advanced mathematical feature. If you’re not aware of a need for them, it’s almost certain you can safely ignore them.

Complex numbers are stored as a pair of machine-level double precision floating point numbers.

x = 3+1j
y = 3+2j
z = 3+3j
x = x + y + z
print (x)

Below are Operation that we can do with number type.

<strictly less than
<=less than or equal
>strictly greater than
>=greater than or equal
!=not equal
isobject identity
is notnegated object identity

Cheat Sheet For Number

OperationResultNotesFull documentation
x + ysum of x and y
x - ydifference of x and y
x * yproduct of x and y
x / yquotient of x and y
x // yfloored quotient of x and y(1)
x % yremainder of x / y(2)
-xx negated
+xx unchanged
abs(x)absolute value or magnitude of xabs()
int(x)x converted to integer(3)(6)int()
float(x)x converted to floating point(4)(6)float()
complex(re, im)a complex number with real part re, imaginary part imim defaults to zero.(6)complex()
c.conjugate()conjugate of the complex number c
divmod(x, y)the pair (x // y, x % y)(2)divmod()
pow(x, y)x to the power y(5)pow()
x ** yx to the power y(5)

String Data Type

Strings in Python are identified as a contiguous set of characters represented in the quotation marks. Python allows either pair of single or double quotes. Subsets of strings can be taken using the slice operator ([ ] and [:] ) with indexes starting at 0 in the beginning of the string and working their way from -1 to the end.

The plus (+) sign is the string concatenation operator and the asterisk (*) is the repetition operator. For example −

#### Declare Variable str and assign string to it
str = "Welcome to Python String Tutorial"
print (len(str))     # Prints length of the str
print (str)          # Prints complete string
print (str[0])       # Prints first character of the string
print (str[2:5])     # Prints characters starting from 3rd to 5th
print (str[2:])      # Prints string starting from 3rd character
print (str * 2)      # Prints string two times
print (str + " More Text") # Prints concatenated string
print (str.lower())  # Prints to lower
print (str.upper())  # Prints all to upper

List data type in Python

list1 = [ 'Apple' , 'Banana' , "Stawberry" ] ## Declare 3 List Element
list1[0] = "Change from apple to Chili"   ## Remember to access List 0 is the first element
list2 = ['Name' , 'Fruit' , '123']
## looping list
for x in list1:
    print (x)
print (list1)          # Prints complete list
print (list1[0])       # Prints first element of the list
print (list1[1:3])     # Prints elements starting from 2nd till 3rd
print (list1[2:])      # Prints elements starting from 3rd element
print (list1 * 2)  # Prints list two times
print (list1 + list2) # Prints concatenated lists
print (len(list1))               ### print how many element in list which is 3
list1.append ("New Element")     ### append to list1
list1.insert (1, 'New Item')     ### insert in list[1] New Item
del list1[0]                     ### remove item from list[0]

Tuple Data Type in Python

While list we begin to declare it with [] , tuple we declare it with () . Unlike List , List can be change while Tuple can’t be change . It is like read only data . Let’s take a look from example below.

tuple1 = ('12345' , 'Some Text Here' , 'Final text here 12345') ## declare tuple Notice we use ()
tuple2 = ('54321', "another text here")
print (len(tuple1))           ## print tuple1 length
print (len(tuple2))           ## print tuple2 length
print (tuple1)           # Prints complete tuple
print (tuple1[0])        # Prints first element of the tuple
print (tuple1[1:3])      # Prints elements starting from 2nd till 3rd
print (tuple1[2:])       # Prints elements starting from 3rd element
print (tuple2 + tuple1)  # prints tuple 2 and follow by tuple 1
#### We try to edit tuple1 with result of error
tuple1[0] = 'Error'     # TypeError: 'tuple' object does not support item assignment

Dictionary Data Type in Python

Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair. Key value is provided in the dictionary to make it more optimized. Each key-value pair in a Dictionary is separated by a colon :, whereas each key is separated by a ‘comma’.

A Dictionary in Python works similar to the Dictionary in a real world. Keys of a Dictionary must be unique and of immutable data type such as Strings, Integers and tuples, but the key-values can be repeated and be of any type.

dict1 = {
    'key1' : 'value1',
    'key2' : 'value2',
    'key3' : 'value3',
    ### Nested Dictionary
    'key4' : { 'A' : 'Welcome' , 'B' : 'To' , 'C' : 'Python'}
##### Let's see what we can do with Dictionary
print (dict1)                  ## print key and value of dict1
print (dict1.get('key1'))      ## print key1 value which is value1
dict1 ['key1'] = 'somevalue'   ## change key1 value to somevalue
dict1 ["key5"] = 'somevalue5'  ## Adding an item to the dictionary is done by using a new index key and assigning a value to it:
del dict1["key2"]                   ## remove key2 from dictionary
dict2 = dict1.copy()                  ## Copy Dictionary
#### We can loop over the key .
for x in dict1:                ## Print all key names in the dictionary, one by one:
#### Print all values in the dictionary, one by one:
for x in dict1:
#### You can also use the values() function to return values of a dictionary:
for x in dict1.values():
#### Loop through both keys and values, by using the items() function:
for x, y in dict1.items():
  print(x, y)
Source :






Python Fast Boot Camp , Calling Operating System Command , save result of OS command to variable.

In this bootcamp , we will look into how to get output from system call command and assign it to variable for later processing or output presentation.

We will use subprocess library

import subprocess

The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions.

The subprocess.Popen() class is responsible for the creation and management of the executed process. In contrast to the previous functions, this class executes only a single command with arguments as a list. This means that you won’t be able to pipe commands.

import subprocess
process = subprocess.Popen(['ls', '-l'],
stdout,stderr = process.communicate()
print (stdout.decode('utf-8'))

incode above we call Popen with command argument ls , -l .


Special value that can be used as the stdinstdout or stderr argument to Popen and indicates that a pipe to the standard stream should be opened.


Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output.

communicate() method to get the standard output and error in case as a tuple.

import subprocess
process = subprocess.Popen(['ls', '-l'],
stdout,stderr = process.communicate()
file = open ("test.txt" , "w")

WordPress How to add color for code using prismjs. Useful for presenting Code with color.

  1. Download PrismJS from http://prismjs.com/ note: only choose language that you want to use or else your file is bigger and may be will slow your site.

2 . Download the JS and CSS do not click download from the top, it will reload the page again . scroll down to the bottom and you will see

3. once you download your prism.js and prism.css , we need to upload it to our theme directory which is at /yourwordpress/directory/wp-content/themes/yourthemehere

upload prism.js to /yourwordpress/directory/wp-content/themes/yourthemehere/
upload prism.css to /yourwordpress/directory/wp-content/themes/yourthemehere/
4. chown apache:apache /yourwordpress/directory/wp-content/themes/yourthemehere/prism.js
chown apache:apache /yourwordpress/directory/wp-content/themes/yourthemehere/prism.css
chmod 644 /yourwordpress/directory/wp-content/themes/yourthemehere/prism.js
chmod 644 /yourwordpress/directory/wp-content/themes/yourthemehere/prism.css

3. Edit your theme functions.php:

On the theme editor, click on “Theme Functions” and add this code:

Add it to the bottom of your function.php

// Function to add prism.css and prism.js to the site
function add_prism() {
    // Register prism.css file
        'prismCSS', // handle name for the style so we can register, de-register, etc.
        get_stylesheet_directory_uri() . '/prism.css' // location of the prism.css file
    // Register prism.js file
        'prismJS', // handle name for the script so we can register, de-register, etc.
        get_stylesheet_directory_uri() . '/prism.js' // location of the prism.js file
    // Enqueue the registered style and script files
add_action('wp_enqueue_scripts', 'add_prism');

To use prism just edit your post with this at the beginning of html
example below we are using python highlighter.

<pre><code class="language-javascript">
enter your text here.

Alternatively , We can Use Plugin , Which Is Call Prismatic.


To use prismatic see the screenshot below. Find the Button of Prismatic at your wordpress editor which is normally at Formatting Block.

Once you used it quite often it will be there in Most Used.

To use it press Prismatic button , once you add text , convert it to html and edit language to your choice language . example .

code class=”language-yourchoiceoflanguage”

source : https://crambler.com/how-to-implement-prism-js-syntax-highlighting-into-your-wordpress-site/

Regular Expression Cheat Sheet for Dummies

Regex BasicsDescription
^The start of a string
$The end of a string
.Wildcard which matches any character, except newline (n).
|Matches a specific character or group of characters on either side (e.g. a|b corresponds to a or b)
Used to escape a special character
aThe character “a”
abThe string “ab”
*Used to match 0 or more of the previous (e.g. xy*z could correspond to “xz”, “xyz”, “xyyz”, etc.
?Matches 0 or 1 of the previous
+Matches 1 or more of the previous
{5}Matches exactly 5
{5, 10}Matches everything between 5-10
Character ClassesDescription
sMatches a whitespace character
SMatches a non-whitespace character
wMatches a word character
WMatches a non-word character
dMatches one digit
DMatches one non-digit
[b]A backspace character
cA control character
Special CharactersDescription
nMatches a newline
tMatches a tab
rMatches a carriage return
ZZZMatches octal character ZZZ
xZZMatches hex character ZZ
A null character
vA vertical tab
(xyz)Grouping of characters
(?:xyz)Non-capturing group of characters
[xyz]Matches a range of characters (e.g. x or y or z)
[^xyz]Matches a character other than x or y or z
[a-q]Matches a character from within a specified range
[0-7]Matches a digit from within a specified range
String ReplacementsDescription
$`Insert before matched string
$’Insert after matched string
$+Insert last matched
$&Insert entire match
$nInsert nth captured group
(?=xyz)Positive lookahead
(?!xyz)Negative lookahead
?!= or ?<!Negative lookbehind
bWord Boundary (usually a position between /w and /W)