Skip to content

Instantly share code, notes, and snippets.

@zenthangplus
zenthangplus / rs256.sh
Last active March 17, 2024 16:26
How to generate RS256 Key Pair for Mac & Linux
#!/usr/bin/env bash
# Generate rsa keys pair
ssh-keygen -t rsa -b 4096 -f rs256.rsa
# Don't add passphrase
openssl rsa -in rs256.rsa -pubout -outform PEM -out rs256.rsa.pub
# Done
cat rs256.rsa
@Razoxane
Razoxane / laravel_conditional_index_migration.php
Created August 8, 2017 01:35
Laravel - Create Index If Not Exists / Drop Index If Exists
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class LaravelConditionalIndexMigration extends Migration
{
/**
* Run the migrations.