Skip to content

Instantly share code, notes, and snippets.

@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
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] {
@p3t3r67x0
p3t3r67x0 / prefixed-properties.md
Last active October 31, 2020 15:16
Be aware that every rendering engine has its own implementation of prefixed properties. As extensions are made part of the standard, the unprefixed identifier is then substituted.

Prefixed style properties

-ms-accelerator

The -ms-accelerator property sets or retrieves a string that indicates whether the object represents a keyboard shortcut.

-ms-accelerator: false | true
@p3t3r67x0
p3t3r67x0 / prefixed-office-properties.md
Last active February 20, 2024 19:15
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
var pseudoClassesAndElementsArray = ['', ':hover', ':focus', ':active', ':first-child', ':first-of-type', ':checked', ':disabled', ':empty', ':enabled', ':invalid', ':last-child', ':last-of-type', ':link', ':only-of-type', ':only-child', ':optional', ':out-of-range', ':read-only', ':read-write', ':required', ':root', ':target', ':valid', ':visited', '::after', '::before', '::first-letter', '::first-line', '::selection', '', ];
var colorListArray = [];
function isArray(data) {
var isArrayBoolean = Object.prototype.toString.call(data) == '[object Array]';
return isArrayBoolean;
}
@p3t3r67x0
p3t3r67x0 / range.html
Last active February 1, 2019 07:52
prettify `<input type=range>` #100 pure CSS
<input type='range' min='0' max='32' step='1' value='20'/>
<input type='range' min='0' max='32' step='1' value='7'/>
<input type='range' min='0' max='32' step='1' value='5'/>
<input type='range' min='0' max='32' step='1' value='8'/>

Beautifiul git log

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
git lg

Nginx

Test the nginx config

$ sudo nginx -t
$ sudo nginx -t -c /etc/nginx/nginx.conf
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
@p3t3r67x0
p3t3r67x0 / hosteurope_virtual_server_hostname.md
Last active February 29, 2016 11:38
Hosteurope virtual server hostname setting script

Script

#!/bin/bash
### BEGIN INIT INFO
# Provides: hostname.sh
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@p3t3r67x0
p3t3r67x0 / bash_commands.md
Last active June 17, 2018 06:26
Some useful vim and bash commands that I only use occasionally

vim

Remove ^M

:%s/\r//g

Remove unwanted whitespaces