Skip to content

Instantly share code, notes, and snippets.

View MossabDiae's full-sized avatar
🔬
Learning

Mossab Diae MossabDiae

🔬
Learning
View GitHub Profile
@zyxar
zyxar / exercise.tour.go
Last active October 28, 2025 01:42
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
@sophia-ooo
sophia-ooo / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@dimasch
dimasch / redis-clear
Last active September 25, 2025 01:56
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@fnimick
fnimick / supabase_profile_sync.sql
Last active August 19, 2025 22:40
Create a `public.profile` table and keep it in sync with supabase `auth.users` for selected fields in both directions.
/**
* USERS
* Note: This table contains user data. Users should only be able to view and update their own data.
* Some data is synced back and forth to `auth.users` as described below.
*
* `full_name`: synced in both directions
* `email`: synced from user metadata to profile only
* `avatar_url`: synced from user metadata to profile only
* `terms_accepted_at`: synced from profile to user metadata only
*/