Skip to content

Instantly share code, notes, and snippets.

@jhoanborges
jhoanborges / setup_cursor_ubuntu.md
Created April 3, 2025 17:56 — forked from evgenyneu/setup_cursor_ubuntu.md
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
Built on Docker with php:8.3.2-fpm-bullseye as a base image
Prerequisites installed: libmagickwand-dev, libmagickwand-6.q16-6
FYI: Same dependencies work properly on PHP 8.2.10
-----
326.0 downloading imagick-3.7.0.tgz ...
326.0 Starting to download imagick-3.7.0.tgz (360,138 bytes)
326.0 .........................................................................done: 360,138 bytes
@jhoanborges
jhoanborges / ImageUploadController.php
Created April 9, 2024 16:30 — forked from krisnaw/ImageUploadController.php
How to use Amazon S3 Presigned POSTs on Laravel + Vue JS
<?php
namespace App\Http\Controllers;
use Aws\S3\PostObjectV4;
use Aws\S3\S3Client;
use Illuminate\Http\Request;
class ImageUploadController extends Controller
{
@jhoanborges
jhoanborges / adb-shellinput.sh
Created October 23, 2023 18:55 — forked from femontanha/adb-shellinput.sh
Open Debugger React Native (Android Device adb shell input)
adb shell input keyevent 82
@jhoanborges
jhoanborges / releaseConfigCommand
Created June 14, 2022 17:25 — forked from LuffyAnshul/releaseConfigCommand
Release Configuration Command
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
--assets-dest android/app/src/main/res/
@jhoanborges
jhoanborges / buildGradleKeyStoreSecure
Created June 14, 2022 17:25 — forked from LuffyAnshul/buildGradleKeyStoreSecure
build Gradle Key Store Secure
signingConfigs {
release {
storeFile file('your_key_name.keystore')
storePassword System.console().readLine("\nKeystore password:")
keyAlias System.console().readLine("\nAlias: ")
keyPassword System.console().readLine("\Alias password: ")
}
}
@jhoanborges
jhoanborges / buildGradleKeyStore
Created June 14, 2022 17:24 — forked from LuffyAnshul/buildGradleKeyStore
build Gradle Key Store
android {
....
signingConfigs {
release {
storeFile file('your_key_name.keystore')
storePassword 'your_key_store_password'
keyAlias 'your_key_alias'
keyPassword 'your_key_file_alias_password'
}
}
@jhoanborges
jhoanborges / day_hours.json
Created June 8, 2022 01:25 — forked from wching/day_hours.json
JSON file with all hours in the day
[
{
"military_format": "0000",
"twenty_four_hour_format": "00:00",
"standard_format": "00:00",
"time_of_day":"md"
},
{
"military_format": "0030",
"twenty_four_hour_format": "00:30",
@jhoanborges
jhoanborges / laravel-password-reset.md
Created February 4, 2020 06:28 — forked from JohnnyWalkerDigital/laravel-password-reset.md
Laravel: Fix password reset (User email not sent)

Here's how to overcome this common gotcha: The default password reset system not working out of the box with Laravel 5.x (as you're not sent the user's password), without having to alter altering vendor/core. Here's how to make it work as you'd expect it to without changing any vendor files.

1. Create own notification

Firstly create a new notification for your app:

php artisan make:notification ResetPassword

Then open the newly created file: app\Notifications\ResetPassword.php and make the following changes:

package com.demotxt.myapp.myapplication.activities;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;