Skip to content

Instantly share code, notes, and snippets.

Alberto Méndez Hernández alberss

Block or report user

Report or block alberss

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alberss
alberss / getStyle.js
Last active Feb 20, 2020
JS Snippets
View getStyle.js
const getStyle = (el, ruleName) => getComputedStyle(el)[ruleName];
getStyle(document.querySelector('p'), 'font-size'); // '16px'
@alberss
alberss / check-dni-nie.ts
Last active Jan 17, 2020
Typescript function to validate spanish DNI and NIE
View check-dni-nie.ts
const validDniNifLetters = 'TRWAGMYFPDXBNJZSQVHLCKET'
const nieRegExp = new RegExp(/^[0-9]{8}[TRWAGMYFPDXBNJZSQVHLCKE]$/)
const dniRegExp = new RegExp(/^[XYZ][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/)
function isDniValid(dni: string): boolean {
if (!nieRegExp.test(dni) && !dniRegExp.test(dni)) return false
const nie = dni
.replace(/^[X]/, '0')
.replace(/^[Y]/, '1')
@alberss
alberss / gist:12253ff07a432b144db962856739f351
Created May 7, 2019 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:12253ff07a432b144db962856739f351

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
You can’t perform that action at this time.