- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /^(\+?56)?(\s?)(0?9)(\s?)[98765432]\d{7}$/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Fn = { | |
| // Valida el rut con su cadena completa "XXXXXXXX-X" | |
| validaRut : function (rutCompleto) { | |
| if (!/^[0-9]+[-|‐]{1}[0-9kK]{1}$/.test( rutCompleto )) | |
| return false; | |
| var tmp = rutCompleto.split('-'); | |
| var digv = tmp[1]; | |
| var rut = tmp[0]; | |
| if ( digv == 'K' ) digv = 'k' ; | |
| return (Fn.dv(rut) == digv ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // we have an array of objects, we want to remove one object using only the id property | |
| const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}]; | |
| // get index of object with id of 37 | |
| const removeIndex = apps.findIndex( item => item.id === 37 ); | |
| // remove object | |
| apps.splice( removeIndex, 1 ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "regiones": [ | |
| { | |
| "region": "Arica y Parinacota", | |
| "comunas": ["Arica", "Camarones", "Putre", "General Lagos"] | |
| }, | |
| { | |
| "region": "Tarapacá", | |
| "comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hs.hotkey.bind({"cmd", "alt", "ctrl"}, "W", function() | |
| hs.alert.show( | |
| "Hello World!", | |
| { | |
| textFont= "Comic Sans MS", | |
| textSize=72, | |
| fadeOutDuration=1 | |
| } | |
| ) | |
| end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Find the latest version on https://github.com/creationix/nvm#install-script | |
| $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| # Add in your ~/.zshrc the following: | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| $ source ~/.zshrc |
ℹ️ Enable iCloud end-to-end encryption:
- Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it’s disabled by default. If you care about data privacy, you should turn it on.
System settings→Apple ID→iCloud→ SetAdvanced Data ProtectiontoOn.System settings→Apple ID→iCloud→ DisableAccess iCloud Data on the Web.
- It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.