Skip to content

Instantly share code, notes, and snippets.

View istvan-ujjmeszaros's full-sized avatar
💭
I may be slow to respond.

István Ujj-Mészáros istvan-ujjmeszaros

💭
I may be slow to respond.
View GitHub Profile
@mrmartineau
mrmartineau / stimulus.md
Last active May 16, 2025 13:02
Stimulus cheatsheet
@pseudosavant
pseudosavant / find-html-tags-regular-expression.js
Last active August 31, 2023 12:42
Javascript Regular Expression for finding HTML tags in a string
const htmlTagRe = /<\/?[^>]+>/gi;
const html = '<span class="error" style="background: none; font-size: 1em;" data-attr=testing123><span disabled class="code">Status text blah blah blah</span> <span class="text">HTTP 500 : Internal Server Error</span></span>';
const plainText = html.replace(htmlTagRe, '');
console.log(plainText); // status text blah blah blah HTTP 500 : Internal Server Error
@p3t3r67x0
p3t3r67x0 / prefixed-office-properties.md
Last active April 28, 2025 13:41
MS Office prefixed style properties can be used for older versions of MS Excel, MS PowerPoint or MS Word when you want to save a document, presentation, workbook, or worksheet as a web document, or even in older versions for MS Outlook.

MS Office prefixed style properties

mso-ansi-font-size

Note: Office only

mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small
@tadas-s
tadas-s / mysql-rename-db.sh
Created April 18, 2013 08:58
MySQL database rename script
#!/bin/bash
# Disclaimer - make backups, use at your own risk.
#
# Based on this comment: http://stackoverflow.com/a/13944924/843067
# Views and stored procedures have to be done separately.
OLDDB="old_db_name"
NEWDB="new_db_name"
MYSQL="mysql -u root -pyour_password "
@allentong
allentong / console.log fallback
Created May 30, 2012 16:10
Console.Log Fallback for Javascript
var alertFallback = false;
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
if (alertFallback) {
console.log = function (msg) {
alert(msg);
};
} else {
console.log = function () { };
}