Skip to content

Instantly share code, notes, and snippets.

Sergei Kriger krigersergei

Block or report user

Report or block krigersergei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
krigersergei /
Last active Jul 15, 2019
Info collected about accessibility topics.
View grid.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
krigersergei /
Created Mar 13, 2017 — forked from cobyism/
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

View hex-to-rgb.js
function hexToRgb(hex) {
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
return r + r + g + g + b + b;
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
View colors.js
var colors = [
"name": "AliceBlue",
"hex": "#f0f8ff",
"rgb": "rgb(240, 248, 255)",
"tone": "white"
"name": "AntiqueWhite",
"hex": "#faebd7",
You can’t perform that action at this time.