Skip to content

Instantly share code, notes, and snippets.

View jewishmoses's full-sized avatar
🎯
Focusing

Moses jewishmoses

🎯
Focusing
View GitHub Profile
{
"recommendations": [
"ms-python.python",
"ritwickdey.liveserver",
"eamodio.gitlens",
"pkief.material-icon-theme",
"ms-vsliveshare.vsliveshare",
"xabikos.javascriptsnippets",
"abusaidm.html-snippets",
"ms-vscode-remote.remote-ssh",
# Functions
function Change-Status
{
param
(
[string]$Status,
[string]$StatusPath = "$env:HOMEDRIVE\status-nymz.txt"
)
@jewishmoses
jewishmoses / install-phpredis.sh
Last active October 2, 2022 04:50
Install phpredis
#!/usr/bin/env bash
set -e
VERSION=5.3.4 # Check if there is a new version and update..
wget https://github.com/phpredis/phpredis/archive/refs/tags/$VERSION.zip
unzip $VERSION.zip
sudo mv phpredis-$VERSION/ /etc/
cd /etc/phpredis-$VERSION/
sudo apt install php-dev -y
phpize
@jewishmoses
jewishmoses / install-redis.sh
Last active June 4, 2021 13:07
Install redis for production
#!/usr/bin/env bash
set -e
sudo apt install build-essential -y
sudo apt install tcl -y # for make test
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make test
@jewishmoses
jewishmoses / install-laravel.sh
Last active June 4, 2021 13:03
Make your Linux machine ready for Laravel (without npm)
# Updating the system
sudo apt update
sudo apt upgrade
# Make PHP 8 available to Install
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
# Installing PHP and Laravel required packages
sudo apt install php nginx curl php-curl mysql-server php-fpm php-mysql php-bcmath php8.0-ctype php8.0-fileinfo php-json php-mbstring php8.0-pdo php-tokenizer php-xml php-zip zip unzip -y
@jewishmoses
jewishmoses / set-password.sql
Created July 3, 2020 14:04
set sql password
SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
SELECT user,authentication_string,plugin,host FROM mysql.user;
exit
@jewishmoses
jewishmoses / example.com
Last active July 3, 2020 14:24
nginx laravel example block
server {
listen 80;
root /var/www/example.com/website/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name example.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}