Skip to content

Instantly share code, notes, and snippets.

Avatar
:atom:
Creating software

Nelson Martell nelson6e65

:atom:
Creating software
View GitHub Profile
@nelson6e65
nelson6e65 / add-phone-number-routing.module.ts
Last active Jun 7, 2022
Ejemplo canDeactivate con Guard automático
View add-phone-number-routing.module.ts
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 Jan 29, 2022
PHPStan examples
View readme.md

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 Jul 20, 2021
Installl mssql in Fedora 34
View index.md

Dependencies

sudo dnf install openldap*

Switch to Python2

# Check current
@nelson6e65
nelson6e65 / README.md
Last active Apr 27, 2021
Install gRPC PHP
View README.md
@nelson6e65
nelson6e65 / phpcs.xml
Last active Mar 12, 2021
PHP CodeSniffer config for Laravel
View phpcs.xml
<?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" />
View functions.scss
@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 Mar 1, 2020
Linter configurations
View .eslintrc.react.json
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
@nelson6e65
nelson6e65 / update.sh
Created Apr 7, 2017
Actualizar configuración y caché de Laravel después de actualizar con `git pull`
View update.sh
#!/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.
#
View MarkdownDiffExample.md
public class Hello
{
   public static void Main()
   {
-      System.Console.WriteLine("Hello, World!");
+      System.Console.WriteLine("Rock all night long!");
   }
}