View install_gradle_4_0.sh
cd /opt
sudo wget https://services.gradle.org/distributions/gradle-4.0-bin.zip
sudo unzip gradle-4.0-bin.zip
sudo mv gradle-4.0 gradle
sudo rm gradle-4.0-bin.zip
export PATH=$PATH:/opt/gradle/bin
gradle -v
View PID.sh
foo &
FOO_PID=$!
# do other stuff
kill $FOO_PID
View install-tomcat-8.5.14.sh
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip
sudo unzip apache-tomcat-8.5.15.zip
sudo mv apache-tomcat-8.5.15 tomcat
View utf_csv.php
$results = [
['اسم المستخدم', 'اسم المستخدم', 'اسم المستخدم'],
[5,8,6],
[5,8,7],
[2,3,5]
];
header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header('Content-Disposition: attachment; filename=sss.csv');
echo "\xEF\xBB\xBF"; // UTF-8 BOM
View gist:2476ec77ad55248f445a
<?php
/*
Plugin Name: Products Plugin
Plugin URI: http://clivern.com/how-to-add-custom-rewrite-rules-in-wordpress/
Description: Register URL rules for our products
Version: 1.0
Author: Clivern
Author URI: http://clivern.com/
License: MIT
*/