Skip to content

Instantly share code, notes, and snippets.

View jsuarezwd's full-sized avatar
🏠
Working from home

Junior Suarez jsuarezwd

🏠
Working from home
View GitHub Profile
@shinigamicorei7
shinigamicorei7 / Routing Basico en PHP.md
Last active April 11, 2024 22:50
Routing Basico en PHP

Una de las necesidades más comunes en el desarrollo de Sitios profesionales es implementar URLs amigables, así convertimos algo como /index.php?articulo=1 por algo más cómodo y agradable a la vista del usuario: /blog/introduccion.htm

Para lograr esto existen muchos paquetes, que son altamente recomendables, como:.

En esta clase no buscamos superar a nadie, simplemente quiero demostrarles que puede ser sencillo hasta cierto nivel.

@maxalmonte14
maxalmonte14 / .php_cs
Last active June 19, 2018 08:46 — forked from jwage/.php_cs
php-cs-fixer PSR-2 git pre commit hook
<?php
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
@runandrerun
runandrerun / combinationLock.js
Created November 13, 2018 17:11
Combination Lock Problem Set
combinationLock = (initialState, code) => {
let totalTurns = 0;
initialState.forEach((i, index) => {
let turns = Math.abs(i - code[index]);
if (turns <= 5) {
return (totalTurns += turns);
} else {
const newTurns = 10 - turns;
return (totalTurns += newTurns);
}