Skip to content

Instantly share code, notes, and snippets.

View martinlikescoffee's full-sized avatar

Martin martinlikescoffee

View GitHub Profile
@jonathansousa
jonathansousa / HTML Character Codes
Created June 27, 2012 00:10
HTML: Character Codes
Name Character Entity
Copyright © ©
Registered ® ®
Trademark ™ ™
Curly Open Double Quote “ “
Curly Closed Double Quote ” ”
Curly Open Single Quote ‘ ‘
Curly Closed Single Quote ’ ’
Big Bullet/Dot • •
@Rodrigo54
Rodrigo54 / php-html-css-js-minifier.php
Last active February 4, 2025 20:00 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@lopspower
lopspower / README.md
Last active March 14, 2025 07:10
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@EdwardRayl
EdwardRayl / gists.txt
Created December 29, 2016 18:31
Lorem Ipsum text
Classic Lorem Ipsum Filler Text:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante.
Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante.
Yar Pirate Ip
@alexwcoleman
alexwcoleman / functions.php
Created November 15, 2018 06:52
WordPress Cleanup
<?php
// ALL OF THIS IS FROM: https://www.linkedin.com/pulse/wp-speed-up-from-ground-alex-knopp
// Post Revisions
// WordPress will simply store every single post revision you create. If your a developer like me then my clients websites change a lot and these post revisions build up. Add the following to your wp-config.php file to stipulate the number of post revisions saved at any one time.
//Define the number of post revisions to be saved
define( 'WP_POST_REVISIONS', 3 );
// WordPress Bloat
@lucasmezencio
lucasmezencio / SLUG.md
Last active March 7, 2025 16:32
Creating URL slugs properly in PHP (including transliteration for UTF-8)

Creating URL slugs properly in PHP (including transliteration for UTF-8)

The point to use a slug (semantic URL) besides of improve the SEO of your articles is to prevent that the user, at the creation of for example an article, it uses special characters that aren't allowed in a URL, appropiate the usage etc. What target usage means, is context dependent.

In this article, you'll learn how to slugify a string in PHP properly, including (or not) support (conversion) for cyrilic and special latin characters.

Slugify in PHP

The following function exposes a simple way to convert text into a valid slug:

@martin-mok
martin-mok / js-encode-decode.md
Created January 11, 2020 23:08 — forked from yidas/js-encode-decode.md
JavaScript HTML Entities Encode & Decode