brew update
cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core
git checkout 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 Formula/[email protected]
brew reinstall [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
This file contains hidden or 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
var Singleton = (function () { | |
var instance; | |
function createInstance() { | |
var object = new Object("I am the instance"); | |
return object; | |
} | |
return { | |
getInstance: function () { | |
// creates instans if it doesn't exist | |
if (!instance) { |
This file contains hidden or 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
(function( $ ) { | |
var o = $( {} ); | |
$.each({ | |
trigger: 'publish', | |
on: 'subscribe', | |
off: 'unsubscribe' | |
}, function( key, val ) { | |
jQuery[val] = function() { | |
o[key].apply( o, arguments ); | |
}; |
This file contains hidden or 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
//part 1 | |
function Player(name) { | |
this.points = 0; | |
this.name = name; | |
} | |
Player.prototype.play = function () { | |
this.points += 1; | |
mediator.played(); | |
}; | |
var scoreboard = { |
This file contains hidden or 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
var pageFacade = { | |
updateMenu: function() { | |
loadData(); | |
resizeColumn(); | |
updateCounter(); | |
setLog(); | |
}, | |
doSmthElse: function() { | |
// a lot of methods | |
} |
This file contains hidden or 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
.slider ul { | |
max-height: 0; | |
overflow: hidden; | |
} | |
.slider:hover ul { | |
max-height: 1000px; | |
transition: .3s ease; /* анимация для max-height */ | |
} |
This file contains hidden or 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
erb | |
<% unless current_page?('/') || current_page?('/projects') %> | |
# '/' the same as root_path | |
show some stuff | |
<% end %> | |
slim, haml | |
- unless current_page?('/') || current_page?('/projects') | |
| \# '/' the same as root_path | |
| show some stuff |
This file contains hidden or 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
:root { | |
font-size: calc(0.6em + 1vw) | |
} | |
@mixin for-size($range) { | |
$phone-upper-boundary: 600px; | |
$tablet-portrait-upper-boundary: 900px; | |
$tablet-landscape-upper-boundary: 1200px; | |
$desktop-upper-boundary: 1800px; |
This file contains hidden or 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
# Inline svg from @tomeara https://gist.github.com/tomeara/6515860 | |
def inline_svg(source) | |
file = File.open("app/assets/images/#{source}", "rb") | |
raw file.read | |
end | |
# SVG internal link | |
#= svg_tag 'sprite/icons.svg', 'icon-facebook-invers' | |
module SvgHelper |
This file contains hidden or 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
# frozen_string_literal: true | |
module ImagesHelper | |
# Acts as a thin wrapper for image_tag and generates an srcset attribute for regular image tags | |
# for usage with responsive images polyfills like picturefill.js, supports asset pipeline path helpers. | |
# | |
# image_set_tag 'pic_1980.jpg', { 'pic_640.jpg' => '640w', 'pic_1024.jpg' => '1024w', 'pic_1980.jpg' => '1980w' }, sizes: '100vw', class: 'my-image' | |
# => <img src="/assets/ants_1980.jpg" srcset="/assets/pic_640.jpg 640w, /assets/pic_1024.jpg 1024w, /assets/pic_1980.jpg 1980w" sizes="100vw" class="my-image"> | |
# | |
# image_set_tag 'logo-amzlenders.png', {'[email protected]' => '2x'} | |
# => <img srcset="/assets/[email protected] 2x" src="/assets/logo-amzlenders.png" alt="Logo amzlenders"> |