Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jenuel Oras Ganawed BroJenuel

🏠
Working from home
View GitHub Profile
@BroJenuel
BroJenuel / meta-tags.md
Created Oct 6, 2021 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@BroJenuel
BroJenuel / presstab.js
Last active Sep 22, 2020
This is a function that will be called when pressing tab when writing inside a text area element in html. This will create 4 spaces just like a tab.
View presstab.js
$('#textarea').keydown(function (e) {
var keyCode = e.keyCode || e.which;
if (keyCode === $.ui.keyCode.TAB) {
e.preventDefault();
const TAB_SIZE = 4;
// The one-liner that does the magic
document.execCommand('insertText', false, ' '.repeat(TAB_SIZE));