- copy your image (
Ctrl+A
andCtrl+C
) - make a new document-sized pure-black layer behind it
- group the black layer and yor image together
- add mask to the group
- enter mask edit mode (
alt+click
on the mask icon/thumbnail) - paste your image in the mask (b/w) and then invert it.
- save it as a 24-bit transparent PNG

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# ВАЖНО. mail.ru время от времени меняет внутрянку, не очень сильно, но требуется адаптация скрипта. | |
# Если скрипт не работает, просьба разместить патч в комментариях или сделать работающий форк. | |
# 2018-06-18 updated: mail.ru changed internals | |
# 2017-09-22 original idea: https://novall.net/itnews/bash-skript-dlya-skachivaniya-fajlov-s-mail-ru-cherez-konsol-linux.html | |
URL="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'pathname' | |
require 'json' | |
def strip_hash(f) | |
ext = f.extname | |
if ext.include?("?") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//== Media queries breakpoints | |
// Extra small screen / phone | |
$screen-xs: 480px; | |
$screen-xs-min: $screen-xs; | |
// Small screen / tablet | |
$screen-sm: 768px; | |
$screen-sm-min: $screen-sm; |
Make sure you have installed Homebrew and (Homebrew-Cask)[http://caskroom.io/].
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Homebrew-cask
brew install caskroom/cask/brew-cask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _decimal.scss | MIT License | gist.github.com/terkel/4373420 | |
// Round a number to specified digits. | |
// | |
// @param {Number} $number A number to round | |
// @param {Number} [$digits:0] Digits to output | |
// @param {String} [$mode:round] (round|ceil|floor) How to round a number | |
// @return {Number} A rounded number | |
// @example | |
// decimal-round(0.333) => 0 |
Custom webfonts
https://gist.githubusercontent.com/mfd/614e2e80a22b878bde63cb471cbe677e/raw/4996edf5eb9aea434e0cbdc81923fb110a29d060/sanfrancisco-font.css
<link rel="stylesheet prefetch" href="https://gist.githubusercontent.com/mfd/614e2e80a22b878bde63cb471cbe677e/raw/eef2aabfd0d588d43285431186a0cf70305ceb80/sanfrancisco-font.css">
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
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Less css trick to generate BEM-styled selectors, by Max Shirsin, http://noteskeeper.ru/1139 + Scss version | |
@block: ~".dm-import-feed"; | |
@{block} { | |
&_step_2 { | |
@{block}__page_step_2 { | |
display: block; | |
} | |
} |
NewerOlder