Skip to content

Instantly share code, notes, and snippets.

View ikurennyi's full-sized avatar

Ievgenii Kurennyi ikurennyi

View GitHub Profile
// let's say we have a 40px font-size at 1280px and 24px font-size at 320px (iPhone 5)
// this is the width of mockup when we have the "max" font-size.
$maxWidth: 1280;
@mixin adaptive-font($pcSize, $mobSize) {
$addSize: $pcSize - $mobSize;
$addMobSize: $addSize + $addSize * .7;
@media (max-width: 767px) {
font-size: calc(#{$mobSize + px} + #{$addMobSize} * ((100vw - 320px) / #{$maxWidth}));
/* mixin for multiline */
@mixin multiLineEllipsis($lineHeight: 1.2em, $lineCount: 1, $bgColor: white){
overflow: hidden;
position: relative;
line-height: $lineHeight;
max-height: $lineHeight * $lineCount;
text-align: justify;
margin-right: -1em;
padding-right: 1em;
&:before {

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email