Skip to content

Instantly share code, notes, and snippets.

View helderferrari2's full-sized avatar

Hélder Ferrari Harayashiki helderferrari2

View GitHub Profile
@saqueib
saqueib / 0_uploader.blade.php
Last active June 9, 2021 15:57
Reusable upload component in Laravel with Dropzone.js - visit http://wp.me/p8cmxL-9Q for tutorial
@php $dropzoneId = isset($dz_id) ? $dz_id : str_random(8); @endphp
<div id="{{$dropzoneId}}" class="dropzone">
<div class="dz-default dz-message">
<h3>{{ $title or 'Drop files here or click to upload.'}}</h3>
<p class="text-muted">{{ $desc or 'Any related files you can upload' }} <br>
<small>One file can be max {{ config('attachment.max_size', 0) / 1000 }} MB</small></p>
</div>
</div>
<!-- Dropzone {{ $dropzoneId }} -->
@odan
odan / xmapp-replacing-mariadb-with-mysql.md
Last active June 4, 2023 19:44
XAMPP - Replacing MariaDB with MySQL

XAMPP - Replacing MariaDB with MySQL

This post has been deleted.

@joashp
joashp / openssl_encrypt_decrypt.php
Created September 4, 2015 15:59
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@lymanlai
lymanlai / mysqldump-cron.sh
Last active February 10, 2020 13:17
this script will mysqldump your db daily, weekly and monthly. and it will only keep three of them, while doing the fourth backup, it will delete the first one first.
#!/bin/bash
#author Lyman Lai
#date 2013-12-30
#source http://002.yaha.me/item/22728a58-c967-46d5-93eb-2649d684a9aa/
MYSQL_USER="yourname"
MYSQL_HOST="localhost"
MYSQL_PASSWORD="yourpassword"
MYSQL_BIN="$(which mysql)"
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet