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 July 17, 2024 02:00
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 July 22, 2024 18:34
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@mathdroid
mathdroid / 1.windows-steps.ps1
Last active January 14, 2024 13:07
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 July 19, 2024 08:06
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@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;