Skip to content

Instantly share code, notes, and snippets.

View teefan's full-sized avatar
🏠
Working from home

Long Tran teefan

🏠
Working from home
  • Teefan Team
  • Sai Gon
  • 10:06 (UTC +07:00)
View GitHub Profile
@ClementParis016
ClementParis016 / script.js
Last active February 5, 2025 11:47
TinyMCE characters counter plugin
tinymce.init({
plugins: 'charactercount',
elementpath: false
});

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@teefan
teefan / perl: warning: Setting locale failed.txt
Created September 28, 2018 10:37
perl: warning: Setting locale failed
export LANGUAGE="en_US.UTF-8"
echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale