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
# SETUP #
DOMAIN=example.com
PROJECT_REPO="git@github.com:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active September 19, 2024 17:18
"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 September 16, 2024 02:40
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

@Enchan1207
Enchan1207 / IDD.md
Last active July 28, 2024 10:59
Issue駆動開発とは

Issue-driven development

Overview

 Issueドリブン開発(課題駆動開発、チケット駆動開発とも)は、issueつまり実装における課題をタスクとして管理・運用する開発手法です。
 新規機能の追加やバグ修正などをissueとして立て、それを解決するためのブランチを切り、コミットやPRで適宜issueを参照しながら開発を進めるというフローを取ります。

Workflow

 ここでは、かろうじてIssueドリブンと呼べるリポジトリとして Enchan1207/YoutubeKit を例に話を進めていきます。

@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"