Skip to content

Instantly share code, notes, and snippets.

View syofyanzuhad's full-sized avatar
🏳️
I'm not superman

Syofyan Zuhad syofyanzuhad

🏳️
I'm not superman
View GitHub Profile
@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')
{
@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 / 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(){
@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()
{
<!doctype html>
<html lang="en">
<head>
<title>Dependant Dropdown Laravolt/Indonesia</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
@syofyanzuhad
syofyanzuhad / step-semantic-ui-jQuery.blade.php
Created September 3, 2021 10:37
Step with semantic-ui, jQuery, laravolt
<x-volt-app :title="'Tes Masuk'">
<x-volt-panel title="Buat Jadwal Tes Masuk">
<div class="ui three top attached ordered steps">
<div data-step="tes-masuk" class="active step">
<div class="content">
<div class="title">Tes Masuk</div>
<div class="description">Menetapkan tes masuk</div>
</div>
</div>
<?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){