Skip to content

Instantly share code, notes, and snippets.

View nelson6e65's full-sized avatar
:atom:
Creating software

Nelson Martell nelson6e65

:atom:
Creating software
View GitHub Profile
:root {
--color-canvas-default: #00000000;
}
.markdown-body {
background-color: var(--color-canvas-default);
}
@media (prefers-color-scheme: dark) {
.markdown-body {
@nelson6e65
nelson6e65 / add-phone-number-routing.module.ts
Last active June 7, 2022 18:21
Ejemplo canDeactivate con Guard automático
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DeactivatableGuard } from './deactivatable.guard';
import { AddPhoneNumberPage } from './add-phone-number.page';
const routes: Routes = [
{
path: '',
component: AddPhoneNumberPage,
@nelson6e65
nelson6e65 / readme.md
Last active November 4, 2022 20:24
PHPStan examples

PHPStan examples

Types

Using string-class<T> generic typehint with static as T

You can use static in generic to refer to the current class. This is useful in trait implementations:

@nelson6e65
nelson6e65 / index.md
Created July 20, 2021 04:57
Installl mssql in Fedora 34

Dependencies

sudo dnf install openldap*

Switch to Python2

# Check current
@nelson6e65
nelson6e65 / README.md
Last active April 27, 2021 01:38
Install gRPC PHP
@nelson6e65
nelson6e65 / phpcs.xml
Last active November 4, 2022 20:23
PHP CodeSniffer config for Laravel
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset name="Default">
<description>Coding standard configuration.</description>
<rule ref="PSR12" />
<rule ref="PEAR.Functions.ValidDefaultValue" />
<rule ref="PEAR.Commenting.InlineComment" />
<rule ref="Squiz.Operators.ValidLogicalOperators" />
<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="50" />
@function dasherize($string) {
$progress: str-slice($string, 2);
$result: str-slice($string, 1, 1);
@while str-length($progress) > 0 {
$char: str-slice($progress, 1, 1);
$mayus: to-upper-case($char);
@nelson6e65
nelson6e65 / .eslintrc.react.json
Last active March 1, 2020 09:29
Linter configurations
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
@nelson6e65
nelson6e65 / readme.txt
Created October 23, 2019 09:51
Wakatime
.
@nelson6e65
nelson6e65 / update.sh
Created April 7, 2017 15:19
Actualizar configuración y caché de Laravel después de actualizar con `git pull`
#!/usr/bin/env bash
# -*- ENCODING: UTF-8 -*-
#
# Copyright © 2017 Nelson Martell (http://nelson6e65.github.io)
#
# Licensed under The MIT License (MIT)
#
# For full copyright and license information, please see the LICENSE
# Redistributions of files must retain the above copyright notice.
#