Skip to content

Instantly share code, notes, and snippets.

View syofyanzuhad's full-sized avatar
🇵🇸
FREE PALESTINE

Syofyan Zuhad 🇵🇸 syofyanzuhad

🇵🇸
FREE PALESTINE
View GitHub Profile
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active July 24, 2024 00:09
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@syofyanzuhad
syofyanzuhad / DependantDropdownController.php
Created September 2, 2021 07:36
Its used for laravolt/indonesia package
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class DependentDropdownController extends Controller
{
public function provinces()
{
@syofyanzuhad
syofyanzuhad / Envoy.blade.php.md
Created July 27, 2021 07:47 — forked from nasirkhan/Envoy.blade.php.md
Deploying with Envoy

SSH Keys

SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

Step One—Create the RSA Key Pair

The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):

@syofyanzuhad
syofyanzuhad / mahfudzot.json
Last active July 18, 2021 08:54
Data json of mahfudzot [Fashlul Awal]
{
"1": [
{
"nomor": 1,
"arab": "مَنْ سَارَ عَلىَ الدَّرْبِ وَصَلَ",
"latin": "Man saara ‘alad darbi washala",
"arti": "Barang siapa berjalan pada jalannya sampailah ia"
},
{
"nomor": 2,
@syofyanzuhad
syofyanzuhad / FileUploader.php
Last active September 13, 2023 20:18
Laravel Trait for uploading Images / Photos, Files and Deleting Files
<?php
namespace App\Traits;
use Illuminate\Support\Facades\Storage;
trait FileUploader
{
public function uploadFile($request, $data, $name, $inputName = 'files')
{
@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active July 22, 2024 15:13
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@syofyanzuhad
syofyanzuhad / Response.php
Created April 17, 2021 22:12 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;

How to install Laravel globally in Ubuntu

===================================================================

Open your terminal using Ctrl+Alt+T and type the following commands

Step 1: Install Laravel

composer global require "laravel/installer"
@brainlagid
brainlagid / laravel-socket-io.md
Last active December 1, 2023 06:57
Setup Laravel with Socket.io [Ubuntu 20.04]

Server Requirement

  • Redis sudo apt install redis-server
  • Composer here
  • npm sudo apt install nodejs npm
  • laravel-echo-server npm install -g laravel-echo-server

Laravel Dependencies Requirement

  • predis
  • laravel-echo
  • socket.io-client ^2.4.0 issue
@RayhanYulanda
RayhanYulanda / ddd.md
Last active December 9, 2023 15:35
Struktur folder Laravel dengan pendekatan DDD