Skip to content

Instantly share code, notes, and snippets.

@gerzahim
gerzahim / code-editor-rules.md
Created April 13, 2025 16:17 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@gerzahim
gerzahim / UploadResume.vue
Created February 10, 2021 22:58 — forked from connor11528/UploadResume.vue
Vue.js component for uploading a file to Amazon S3
<template>
<div class="row text-center">
<div class="col-md-12 mb-3">
<label>Upload your resume</label>
<small>(.pdf or .docx file please)</small>
</div>
<div class="col-4 offset-4 text-center mb-3">
<!-- Upload resume button. Trigger function on browser file upload -->
<input type="file" name="resume" @change="uploadResume" class="form-control-file">
</div>
@gerzahim
gerzahim / s3-file-upload.js
Created February 10, 2021 21:59 — forked from keithweaver/s3-file-upload.js
S3 File Upload to AWS S3
const AWS = require('aws-sdk');
const Busboy = require('busboy');
const BUCKET_NAME = '';
const IAM_USER_KEY = '';
const IAM_USER_SECRET = '';
function uploadToS3(file) {
let s3bucket = new AWS.S3({
accessKeyId: IAM_USER_KEY,
@gerzahim
gerzahim / AppServiceProvider.php
Created January 31, 2021 14:03 — forked from iamsajidjaved/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@gerzahim
gerzahim / position.html
Last active April 21, 2020 21:33
css position relative, absolute, fixed, sticky
<div class="section2">
<p>Hola <span>mundo Abs</span>
Reponsive Design
</p>
</div>
<div class="section">
<p>Hola <span>mundo relative</span>Reponsive Design
</p>
</div>
@gerzahim
gerzahim / postcss.config.js
Last active April 25, 2020 19:13
PostCss postcss.config.js
const purgecss = require('@fullhuman/postcss-purgecss')
module.exports = {
plugins: [
require('tailwindcss')('./tailwind.config.js'),
require('autoprefixer'),
purgecss({
content: [
'./**/*.html',
//Para agregar soporte para otro tipo de archivos.
@gerzahim
gerzahim / ArticleFactory.php
Created April 17, 2020 16:55
Laravel Factory
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\User;
use Faker\Generator as Faker;
use Illuminate\Support\Str;
/*
|--------------------------------------------------------------------------
@gerzahim
gerzahim / 140622_create_articles_table.php
Last active April 20, 2020 14:07
Laravel_migration
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductsTable extends Migration
{
/**
* Run the migrations.
@gerzahim
gerzahim / PurchasesController.php
Last active April 17, 2020 20:11
Laravel_Controller
<?php
public function create(){
return view('tag.create', [
'tags' => Tag::all()
]);
}
public function store()
{
$this->validateArticle()
@gerzahim
gerzahim / welcome.blade.php
Last active April 17, 2020 19:25
Laravel_blades_view
<?php
<!-- Form Delete -->
<form action="{{ url('images/' . $image['name']) }}" method="POST">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<button type="submit" class="btn btn-default">Remove</button>
</form>
<!-- Better Practice -->
<h2><a href="/articles/{{ $article->id }}">