Skip to content

Instantly share code, notes, and snippets.

View gegeriyadi's full-sized avatar
🏠
Working from home

Teguh Riyadi gegeriyadi

🏠
Working from home
View GitHub Profile
@frazras
frazras / unhack.sh
Created February 10, 2019 21:54
Use this script to remove the Javascript redirect hack that infects all your javascript files and redirects them to sites associated with uncontinuer.tk or getmyfreetraffic.com
#navigate to your web root and run this.
#I provide no warranty that it may not affect benign files but this worked for me
#so I though I should share it.
sudo grep -rl 'var _0x' . | xargs sudo sed -i -e 's/var _0x.*));//g'
@victor-perez
victor-perez / git.bat
Last active August 1, 2024 21:06
Use WSL git inside VS Code from Windows 10 17046
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::this also support calls that contains a absolute windows path
::check of one of the params contain a absolute windows path
echo.%* | findstr /r /c:"[a-z]:[\\/]" > nul
if %errorlevel% == 1 (
::if not just git with the given parameters
call :git %*
@gegeriyadi
gegeriyadi / Best permission for wordpress directory (ubuntu 16.04) .md
Last active July 29, 2021 07:06
Best permission for wordpress directory (ubuntu 16.04)

Best permission for wordpress directory (ubuntu 16.04)

first, go to your wordpress path and then run this command

sudo chown www-data:www-data . -R
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active February 20, 2024 10:00
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip

#STEP 1 Create a new laravel project. For more info, check the laravel docs page, on the laravel website

composer create-project laravel/laravel --prefer-dist my-laravel-app

#STEP 3 Install heroku toolbelt, on your machine. Assuming its ubuntu, just follow the following instructions Heroku toolbelt is a command line client, for heroku

@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@danharper
danharper / a.md
Last active September 2, 2020 17:13
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.