Skip to content

Instantly share code, notes, and snippets.

@asheroto
asheroto / Disable-EdgeAnnoyances.reg
Last active August 24, 2025 03:50
Disable annoying Microsoft Edge first run experience, implicit sign-in, disable shopping, rewards, default browser campaign, auto import, forced sync, sidebar, restore browser reminder. Shows home button, enables SmartScreen.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\Recommended]
"UserFeedbackAllowed"=dword:00000000
"AutoImportAtFirstRun"=dword:00000001
"SmartScreenEnabled"=dword:00000001
"PersonalizationReportingEnabled"=dword:00000000
"ShowRecommendationsEnabled"=dword:00000000
"ForceSync"=dword:00000000
"SyncDisabled"=dword:00000001
@kemp
kemp / readme.md
Created May 16, 2023 16:42
Local Nginx RTMP Server

Local RTMP Server

Useful for rebroadcasting to your local network

docker run --rm -p 1935:1935 tiangolo/nginx-rtmp

Then in OBS, set the stream settings:

@lynt-smitka
lynt-smitka / .htaccess
Last active August 12, 2024 09:18
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
@manashcse11
manashcse11 / laravel-collection-group-by-with-sum.php
Last active September 7, 2022 14:50
#Laravel collection #group by with sum
<?php
$collection = collect([
['item_id' => 10, 'status_id' => 1, 'point' => 3],
['item_id' => 11, 'status_id' => 2, 'point' => 2],
['item_id' => 12, 'status_id' => 3, 'point' => 4],
['item_id' => 13, 'status_id' => 3, 'point' => 1],
]);
$grouped = $collection->groupBy('status_id')
->map(function ($item) {
@slow-is-fast
slow-is-fast / laravel remove index.php from url.md
Last active February 24, 2025 17:31
[nginx] laravel remove index.php from url
# Remove index.php$
if ($request_uri ~* "^(.*/)index\.php$") {
    return 301 $1;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;

    # Remove from everywhere index.php

if ($request_uri ~* "^(./)index.php(/?)(.)") {

@statickidz
statickidz / nearby-coordinates.sql
Last active July 23, 2025 19:36
Ordering with SQL by nearest latitude & longitude coordinates (MySQL & SQLite)
---
METHOD 1
This should roughly sort the items on distance in MySQL, and should work in SQLite.
If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance.
---
SELECT *
FROM table
ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC