Skip to content

Instantly share code, notes, and snippets.

View alifma's full-sized avatar
🏠
Working from home

Alif Maulana Arifin alifma

🏠
Working from home
View GitHub Profile
@alifma
alifma / SupabaseStorageRLS.sql
Created April 6, 2025 15:15
SUPABASE Storage RLS
-- Enable row-level security
ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY;
-- Policy for SELECT operations
CREATE POLICY objects_select_policy ON storage.objects FOR SELECT
USING (auth.role() = 'authenticated');
-- Policy for INSERT operations WITH CHECK !
CREATE POLICY objects_insert_policy ON storage.objects FOR INSERT
WITH CHECK (auth.role() = 'authenticated');
function charFrequency(str) {
// implementasi
}
console.log(charFrequency("hello world"));
// output: { h: 1, e: 1, l: 3, o: 2, ' ': 1, w: 1, r: 1, d: 1 }
function fizzBuzz(n) {
// implementasi
}
fizzBuzz(15);
// output:
// 1
// 2
// Fizz
// 4
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
npm install --global yarn
@alifma
alifma / index.html
Created November 17, 2023 10:49
CheckRaw
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>