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

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"
@syofyanzuhad
syofyanzuhad / FormRequest.php
Last active September 12, 2021 20:55 — forked from jamesmills/FormRequest.php
change your default extends FormRequest to your customize FormRequest (API ONLY)
<?php
namespace App\Http\Requests\Api;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
@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;
@syofyanzuhad
syofyanzuhad / README.md
Created June 11, 2021 08:45 — forked from gbraad/README.md
Buy me a coffee

Buy me a coffee

Using inlined HTML

Buy Me A Coffee

<a href="https://www.buymeacoffee.com/gbraad" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
@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 / thirugram.js
Created August 21, 2021 15:51 — forked from scriptnull/thirugram.js
spam telegram via telegram web
//spam message the chats with thirugram.js
//open up telegram web and go to the chat you want to spam
//open console ( Ctrl + Shift + J )
//execute the code
var message = ""; //spam message
var interval = 1 ; // in seconds
var count = 10 ; //number of times to send
var notifyInterval = 5 ; //notify
var i = 0 ;
var timer = setInterval(function(){
<?php
interface Logger
{
public function execute();
}
<?php
class LogToDatabase
{
public function execute($message)
{
var_dump('log the message to a database :'.$message);
}
}
<?php
interface Logger
{
public function execute($message);
}
class LogToDatabase implements Logger
{
public function execute($message){
<?php
abstract class AbstractClass
{
// Force Extending class to define this method
abstract protected function getValue();
public function printOut()
{
print $this->getValue() . "\n";