Skip to content

Instantly share code, notes, and snippets.

View parollon's full-sized avatar
💭
Declare variables, not war

parollon

💭
Declare variables, not war
View GitHub Profile
@parollon
parollon / ESLint-Prettier.md
Created May 27, 2025 08:21
ESLint-Prettier.md

Eslint + Prettier + Ionic/Angular

npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin

npm install --save-dev @ionic/eslint-config

ESLint

.eslintrc.json

@parollon
parollon / Android User Agents.txt
Last active September 9, 2024 10:21 — forked from moomerman/ua.txt
iPad/iPhone User Agents and Android agents
Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 525) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537
Mozilla/5.0 (Linux; U; Android 4.3; en-us; ZTE-Z667G Build/JLS36C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Mozilla/5.0 (Android; Linux armv7l; rv:5.0) Gecko/20110615 Firefox/5.0 Fennec/5.0
Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
Mozilla/5.0 (Linux; Android 4.4.2; 0PCV1 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36
Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; GT-I9505 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; GT-N8013 Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
Mozilla/5.0 (Linux; U; Android 4.4.2; en-us;
@parollon
parollon / dynamic-height-modal.component.html
Last active August 27, 2024 08:15
Ion-Modal dynamic height
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-button (click)="dismiss()">
<ion-icon slot="icon-only" name="close-outline"></ion-icon>
</ion-button>
</ion-buttons>
<ion-title>My Modal</ion-title>
</ion-toolbar>
</ion-header>
=======================
Code:
==============================================================================================================
@ViewChild('noNumericCharsInput1', { static: true }) noNumericCharsInput1!: IonInput;
@ViewChild('noNumericCharsInput2', { static: true }) noNumericCharsInput2!: IonInput;
...
@ViewChild('noNumericCharsInputN', { static: true }) noNumericCharsInputN!: IonInput;
viewChildsInputBehaviours: Subscription[] = [];
du -h -d 1 2>/dev/null | sort -hr // mida cdels directortis
@parollon
parollon / show-hide-password.ts
Last active October 1, 2024 10:35
show hide password fuction many
<ion-input
[type]="getPasswordStatus('password1')"
>
<ion-button
(click)="showHidePassword('password1')"
fill="clear"
slot="end"
aria-label=""
>
<ion-icon
@parollon
parollon / share-urls.md
Created October 17, 2023 08:51 — forked from apisandipas/share-urls.md
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@parollon
parollon / center_fucking_div_definitve.html
Created October 6, 2023 09:01
Center a fucking div definitive way LOL
<div style="border: 1px solid red; height: 100%; width: 100%; display: flex; align-items: center">
<p style="border: 1px solid green">Centered vertically</p>
</div>
<div style="border: 1px solid red; height: 100%; width: 100%; display: flex; justify-content: center">
<p style="border: 1px solid green">Centered horitzontally</p>
</div>
<div
style="
border: 1px solid red;
@parollon
parollon / proxy-generator.ts
Last active October 16, 2024 07:26
Crear un fitxer proxy per ionic-angular
//https://www.typescriptlang.org/es/play?#code/JYOwLgpgTgZghgYwgAgApQPYA8CeBhDEGYAc2QG8AoZZAbQGsIcAuZAZzClBIF1WqaNMHCgkIYVhy4gSAbmqC2EBAFcoEVgCMMGADYQ4IeYOQIAFobEB5LiVBad+w8cG6MJADIQAbhF2TObhcaAAc4MDMAJQgAdy5IfgUTBiYA6V40oKTkAF8XPMocykoYFRAEMGBCZDEQaHCIdGx8QmISAAo1XTZMmVoeAEpWJtwCIlIKBQRCDmQQzFHW0mGFlvGyAF4KAoUutgA6GAwoAFFEM3bOqF0B5A2APkmTaZBZgFtw8zvkLv2PsHM7QA9AA9dpmMBgEJsAD8zAAOkDEbQQUCeABqAbtZGojFYxH7ABUAwAJECBsFkMAYMh2v9zLcBCZTDMwHQADTIYSicSc+YQYhYPnhMw8b70syUmgvWaMHDfAAGJPI-MFOSBhIVUrmqzGbRSODFWyZzK5IjEYHZ2RMSlU6lYnBUECtpulFhkEBspHsXKgTpdrrcnh8flYAHIACYQTQqEhhgOmsIRaJxYAJJ6umi0BUg5Wq4BYHIKvg6gUFhPMnIVmgFExFGsU4o0dRgNQgHXNPWkeRFSgytmgEIqMAAVWubG+tAUACIIVCekCgeoAI7qA6gIFwELAIEqJRQWFhMQbABM04Ds8h0OYi5Xa-2G63O7K9BAGBiICBZ4vc+vt4gq4QOun5PkuEB2Bw0DnjOv4LmBgHAZu25AkGoDTjQlA8MUfash2izrN8tT1JAIxrG07SDsOY7dI2Mp6BA+xBu0ABSADKVgAHL7FI3DUjg7TzJ2SwkJyIAqLouicieAwUkAA
interface ProxyConfig {
[key: string]: {
target: string;
secure: boolean;
changeOrigin: boolean;
logLevel: string;
pathRewrite: {
@parollon
parollon / Remove_file_from_all_history.md
Last active August 30, 2023 06:31
remove file or directory from all history

Remove file from all Git history!

  1. Use the comamnd

    git filter-branch --force --index-filter \
      'git rm -r --cached --ignore-unmatch [FILE_TO_DELETE]' \
      --prune-empty --tag-name-filter cat -- --all
    
  2. After the filter branch is complete, verify that no unintended file was lost.

  3. Now add a .gitignore rule