Skip to content

Instantly share code, notes, and snippets.

View kresnasatya's full-sized avatar
🤫
Shh!

Kresna Satya kresnasatya

🤫
Shh!
View GitHub Profile
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active June 13, 2025 13:23
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@thomasdarimont
thomasdarimont / index.html
Last active April 8, 2024 14:10
Mini SPA with Keycloak.js with support for PKCE and RAR
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Keycloak SPA Demo</title>
<style>
body {
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active June 12, 2025 01:10
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@mathdroid
mathdroid / 1.windows-steps.ps1
Last active August 21, 2024 02:47
WSL2 Setup
# 0. open a PowerShell as administrator
# 1. Enable WSL
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# 2. Enable VM Platform
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# 3. RESTART system, then open a PowerShell as administrator again
# MAKE SURE YOU HAVE RESTARTED BEFORE YOU CONTINUE

TERUSLAH BERSAHABAT SAMPAI WAKTUNYA PULANG

Ketika ada kesempatan, pergilah bersama teman teman lama. Berkumpul - kumpul, bukan sekadar makan, minum dan bersenang, senang tetapi ingat, Waktu hidup kita semakin singkat. Maka dari itu, bangunkanlah Persaudaraan

Mungkin lain waktu kita Tidak akan bertemu lagi.

Mungkin lain waktu kita sudah semakin Susah untuk berjalan.

Umur itu Seperti es batu, Dipakai atau tidak akan tetap mencair dan berakhir.

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@akhileshdarjee
akhileshdarjee / scheduling mysql backups with laravel.php
Created April 22, 2019 14:10
Scheduling MySQL backups with Laravel
To manually dump the database you can run the following one-liner code
mysqldump -u[user] -p[pass] [db] > [file_path]
But what if you want to automate the process, here are the steps:
1. Setup cron entry to your server
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
2. Create a command BackupDatabase by running the following code:
@bmaupin
bmaupin / open-source-sso.md
Last active June 13, 2025 14:34
Comparison of some open-source SSO implementations

⚠️ This is not maintained. Feel free to check comments and/or forks for more current options.

Background

This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management

Comparison

(Items in bold indicate possible concerns)

@JuanDMeGon
JuanDMeGon / TransformInput.php
Created July 13, 2017 17:38
This is the modification of middleware to Transform file inputs too
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Validation\ValidationException;
class TransformInput
{
/**
@agusibrahim
agusibrahim / ConnectionStatus.java
Last active July 3, 2017 00:45
Check Network Connectivity available or not
package ai.agusibrahim.kepooto;
import java.net.Socket;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import android.os.AsyncTask;
import ai.agusibrahim.kepooto.ConnectionStatus.*;
import android.content.Context;
import android.net.ConnectivityManager;