Skip to content

Instantly share code, notes, and snippets.

View linuxbastard's full-sized avatar
🎯
Focusing

Ronaldo Bartolome linuxbastard

🎯
Focusing
View GitHub Profile
@norcross
norcross / force-image-https.php
Created January 21, 2015 02:08
filter content to rewrite image src to https
<?php
add_filter( 'the_content', 'rkv_force_https_images', 10 );
/**
* check image URLs and force https on them
*
* @param [type] $content [description]
*/
function rkv_force_https_images( $content ) {
return str_replace( 'src="http://css-tricks.com', 'src="https://css-tricks.com', $content );
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active July 25, 2025 09:29
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@bitsandbooks
bitsandbooks / add-nginx-vhost.sh
Last active June 22, 2017 01:45
My custom script for adding a vhost to Nginx.
#!/usr/bin/env bash
#
# Nginx - new server block
# http://rosehosting.com
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
working() { echo -ne '\e[1;33m'$1'\e[m'; } # Yellow
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; }