Skip to content

Instantly share code, notes, and snippets.

View bosunski's full-sized avatar
:octocat:
Sleeping Here!

Bosun Egberinde bosunski

:octocat:
Sleeping Here!
View GitHub Profile
@fideloper
fideloper / SlackActionController.php
Created February 6, 2024 15:01
Verify Slack webhooks in Laravel
<?php
namespace App\Http\Controllers\Slack;
use App\Slack\Webhook;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
@HelgeSverre
HelgeSverre / caddy-vapor-ssl.sh
Created March 28, 2023 12:37
Updated: Unlimited SSL Domain on Laravel Vapor
# Stop and disable NGINX
sudo systemctl stop nginx
sudo systemctl disable nginx
# Install Go
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm -f go1.20.2.linux-amd64.tar.gz
@IvanChepurnyi
IvanChepurnyi / server.php
Last active October 28, 2023 15:34
Simple multi-process ReactPHP server with workers control
<?php
/**
* Copyright © EcomDev B.V. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
$port = $argv[1];
$serverName = $argv[2];
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active April 21, 2024 22:10
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: