Just download Raspberry Pi OS Lite 32Bit
https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
Download & Install etcher for OS Flash
https://www.balena.io/etcher/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Bulk Edit for variation products | |
Author: Dariush vesal | |
Plugin URI: https://vesal.blog | |
Description: Bulk Edit for variation products | |
Author URI: https://vesal.blog | |
Text Domain: bulk-variation | |
Version: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You need to install `imagemagick` | |
# sudo apt install imagemagick | |
function compress_image { | |
cd "$1" | |
HAS_IMAGE=$(ls | grep ".jpg" | wc -l) | |
if [ "$HAS_IMAGE" -gt 0 ]; then | |
mkdir -p compress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir -p /etc/systemd/system/docker.service.d | |
sudo touch /etc/systemd/system/docker.service.d/proxy.conf | |
echo ' | |
[Service] | |
Environment="HTTP_PROXY=http://USERNAME:PASSWORD@IP:PORT" | |
Environment="NO_PROXY="localhost,127.0.0.1,::1" | |
' > /etc/systemd/system/docker.service.d/proxy.conf; | |
sudo systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "install some app" | |
sudo apt-get update | |
sudo apt-get -y install htop git | |
echo "Install shecan" | |
curl https://gist.githubusercontent.com/devlifeX/d2918f7af1d10409b5c82a52795b5c54/raw/0e098e5d1d90fb5e6fe74a1f52cb53953bfa076f/shecan.sh | sudo bash - | |
echo "install docker and docker-compose" | |
curl https://gist.githubusercontent.com/devlifeX/be64df7608e08853aad995c65872df59/raw/59401f9a980a869ff7cfedc1e1205d8bd2451fcc/docker-installer.sh | sudo bash - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R www-data:www-data wp-content | |
sudo chown -R www-data:www-data wp-admin | |
sudo chown -R www-data:www-data wp-includes | |
sudo chown www-data:www-data index.php | |
sudo chown www-data:www-data wp-activate.php | |
sudo chown www-data:www-data wp-blog-header.php | |
sudo chown www-data:www-data wp-comments-post.php | |
sudo chown www-data:www-data wp-config.php | |
sudo chown www-data:www-data wp-cron.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cat > /etc/docker/daemon.json <<EOF | |
{ | |
"registry-mirrors": ["https://dockerhub.ir"] | |
} | |
EOF | |
sudo systemctl restart docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requiremnts: Docker, Docker Compose a Server with 256 MB Of RAM. | |
# If you neeed Install docker and docker compose on ubuntu (tested on ubuntu 16) use this gist: https://gist.github.com/devlifeX/be64df7608e08853aad995c65872df59 | |
# 1) Put the content in ovpn.sh | |
# 2) chmod +x ovpn.sh | |
# 3) execute like this: ./ovpn.sh xxx.xxx.xxx.xxx (xxx's is your ip or domain address) | |
BASE=/home/$(whoami) | |
CONFIG="$BASE/openvpn-data/conf/openvpn.conf" | |
mkdir -p $BASE | |
cd $BASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker section ################################################ | |
# - Stop all running docker containers | |
function stopAll { | |
containers=$(docker ps -qa) | |
if [ ! -z "$containers" ] | |
then | |
echo $containers | xargs docker container rm -f $1 | |
else | |
echo "No Containers for remove!" | grep -e "." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Listing_Import | |
{ | |
public function __construct() | |
{ | |
if ( | |
isset($_GET['task']) && | |
$_GET['task'] === "import" | |
) { | |
add_action('init', [$this, 'doAction']); |
NewerOlder