Skip to content

Instantly share code, notes, and snippets.

View enmanuel97's full-sized avatar

Jesus Enmanuel De La Cruz enmanuel97

View GitHub Profile
//parent selector
#container {
@media (max-width: 779px) and (min-width: 0px) {
column-count: 2;
}
@media (max-width: 1039px) and (min-width: 780px) {
column-count: 3;
}
@enmanuel97
enmanuel97 / string_to_color_helper.dart
Created July 20, 2021 19:46
String to Color - Flutter
Color colorFromHex(String hexColor) {
String hexCode = hexColor.replaceAll('#', '');
return Color(int.parse('FF$hexCode', radix: 16));
}
import { useState } from "react"
interface Validation {
[key: string]: {
required?: boolean;
minLength?: boolean;
maxLength?: boolean;
isEmail?: boolean;
isNumeric?: boolean;
}
@enmanuel97
enmanuel97 / BaseRepository.php
Last active June 2, 2022 21:34
BaseRepository.php
<?php
namespace App\Repositories;
use Illuminate\Container\Container as Application;
use Illuminate\Database\Eloquent\Model;
abstract class BaseRepository
{
/**
@enmanuel97
enmanuel97 / AccountRepository.php
Created June 2, 2022 21:36
AccountRepository.php
<?php
namespace App\Repositories;
use App\Models\Account;
class AccountRepository extends BaseRepository
{
/**
* @var array
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Debug helper
*
* Print clear and readable data only in development environment and automatically put die in your code
*
* @category Helpers
* @author Ahmad Samiei <ahmad.samiei@gmail.com>
* @version 1.2.0