Skip to content

Instantly share code, notes, and snippets.

View ousid's full-sized avatar
🔥
Building Livewire Toolkit

Oussama ousid

🔥
Building Livewire Toolkit
View GitHub Profile
@saineshmamgain
saineshmamgain / app.js
Created May 5, 2020 04:06
Setting up laravel-websockets on production server using nginx proxy with letsencrypt ssl
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
wsHost: window.location.host,
wsPort: 80,
wssPort: 443,
disableStats: true,
enabledTransports: ['ws', 'wss'],
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
});
@dllud
dllud / xmpp-servers-tor-hidden-service.md
Last active March 16, 2024 21:55
Public XMPP servers with Tor Hidden Service

Public XMPP servers with Tor Hidden Service

This is a tentative list of public XMPP (Jabber) servers that provide a Tor Hidden Service (.onion address) for connections from within Tor network. By public I mean, servers that are free for everyone to use and place no barriers on registration.

Clearnet domain Tor Hidden Service In-Band registration XEP compliance IM Observatory grade
5222.de jtovcabr2vhflcqg.onion disabled Excellent A
bommboo.de ujvdniabz53upqfx.onion disabled Excellent A
[ch
@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:

@atorscho
atorscho / FileHelper.php
Last active September 19, 2022 09:32
Helpers to manipulate with files and images for Laravel projects.
<?php
namespace App\Helpers;
use Closure;
use Image;
use Intervention\Image\Constraint;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class FileHelper