Skip to content

Instantly share code, notes, and snippets.

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

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
@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'/>
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 / 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
@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 / pseudo_elements.md
Last active February 25, 2025 22:27
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] {