Skip to content

Instantly share code, notes, and snippets.

View mhsaghatforoush's full-sized avatar
🌏
working from office

Mohammad hosein Saghatforoush mhsaghatforoush

🌏
working from office
View GitHub Profile
@tprinty
tprinty / Adding Logging to Laravel Authentication
Last active July 14, 2024 04:32
Add Logging to Lavavel Authentication
Here is a quick way to add authentication logging to Laravel.
1. Modify app/Providers/EventServiceProvider.php and add lines 16 through 32 of the example file in this GIST.
2. Create a new file app/Listeners/LogActivity.php and copy the contents of the file below into that file.
3. Enjoy logging.
@phortuin
phortuin / postgres.md
Last active October 10, 2024 23:00
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

### macOS Catalina: “App is damaged and can't be opened. You should move it to the trash.”
```
sudo xattr -rd com.apple.quarantine '/Applications/Navicat Premium.app'
```
@dennysfredericci
dennysfredericci / search-ul-li-item.js
Created July 22, 2014 18:19
A simple jquery code to search a text inside of li tag
//searchText is a input type text
$('#searchText').bind('keyup', function() {
var searchString = $(this).val();
$("ul li").each(function(index, value) {
currentName = $(value).text()
if( currentName.toUpperCase().indexOf(searchString.toUpperCase()) > -1) {