Skip to content

Instantly share code, notes, and snippets.

// Find Duplicate Rows//
SELECT
email, COUNT(email)
FROM
contacts
GROUP BY
email
HAVING
COUNT(email) > 1;
// End //
//Install Docker On Windows
# Update the apt package list.
sudo apt-get update -y
# Install Docker's package dependencies.
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \

Install composer like so:

sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php

After installation, you should then symlink it by running command:

sudo ln -s /opt/lampp/bin/php /usr/local/bin/php

Then run the command below to allow the 'composer' command to be run globally (this will be run from within the folder where you've just installed composer in which a composer.phar file has just been created):

//Get Number OF All Http Connections
netstat -atnpl | grep :443 | wc -l
//Get Number Of Live Connection
netstat -atnpl | grep :443 | grep -i estab | wc -l
// Apache Benchmark
ab -n 2000 -c 200
//Strace PID
$colours:
"red" #FF0000,
"blue" #001EFF,
"green" #00FF00,
"yellow" #F6FF00;
@each $i in $colours{
.#{nth($i, 1)}-background {
background: nth($i, 2);
}
if ( ! wp_next_scheduled( 'parna_reset_all_credits_hook' ) ) {
wp_clear_scheduled_hook( 'parna_reset_all_credits_hook' );
$timestamp = strtotime('today midnight') - 12600;
wp_schedule_event( $timestamp, 'daily', 'parna_reset_all_credits_hook' );
}
add_action('parna_reset_all_credits_hook', 'parna_reset_all_credits');
function parna_reset_all_credits() {
$args = array(
mongod.exe --dbpath "D:\mongodb\data\db"
mongod --auth --port 27017 --dbpath /var/lib/mongodb
//User Login
mongo --port 27017 --authenticationDatabase "admin" -u "myUserAdmin" -p
//Backup Database
mongodump --db={db name} --out="{path}" --username={username} --password="{password}"
mongodump --db=omrani --out=D:/mongodb/data/backup/`date +"%m-%d-%y"` --username=omrani --password="{password}"
rm -f /usr/bin/php
ln -s /usr/local/lsws/lsphp73/bin/lsphp /usr/bin/php
php -v
cd /usr/local
cp CyberCP/CyberCP/settings.py settings.py
rm -rf CyberCP
git clone --single-branch -b v1.7-dev https://github.com/usmannasir/cyberpanel
mv cyberpanel CyberCP
cp settings.py CyberCP/CyberCP
virtualenv --system-site-packages /usr/local/CyberCP
source CyberCP/bin/activate
pip install --ignore-installed -r CyberCP/requirments.txt
deactivate
yum install -y pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc
pango.x86_64
libXcomposite.x86_64
libXcursor.x86_64
libXdamage.x86_64
libXext.x86_64
libXi.x86_64
libXtst.x86_64
cups-libs.x86_64