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
#!/bin/bash | |
apt-get update | |
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev | |
mkdir -p /etc/php7/conf.d | |
mkdir -p /etc/php7/cli/conf.d | |
mkdir /usr/local/php7 | |
cd /tmp | |
git clone https://github.com/php/php-src.git --depth=1 | |
cd php-src | |
./buildconf |
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
/* ========================================================================== | |
Section comment block | |
========================================================================== */ | |
/* Sub-section comment block | |
========================================================================== */ | |
/** | |
* Short description using Doxygen-style comment format | |
* |
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
"devDependencies": { | |
"browser-sync": "^2.2.1", | |
"del": "^1.1.1", | |
"gulp": "^3.8.11", | |
"gulp-concat": "^2.5.2", | |
"gulp-filter": "^2.0.2", | |
"gulp-less": "^3.0.1", | |
"gulp-minify-css": "^1.1.1", | |
"gulp-uglify": "^1.2.0", | |
"gulp-util": "^3.0.4", |
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
$("#button").click(function() { | |
$('html, body').animate({ | |
scrollTop: $("#elementtoScrollToID").offset().top | |
}, 2000); | |
}); |
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
@media(max-width:767px){} // xs | |
@media(min-width:768px) and (max-width:991px){} // sm | |
@media(min-width:992px) and (max-width:1199px){} // md | |
@media(min-width:1200px){} // lg | |
@media(max-width:991px){} // xs - sm | |
@media(max-width:1199px){} // xs - md | |
@media(min-width:768px) and (max-width:1199px){} // sm - md | |
@media(min-width:768px){} // sm - lg | |
@media(min-width:992px){} // md - lg |
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
.include-custom-font(@family: arial, @file: arial, @weight: normal, @style: normal){ | |
@font-face{ | |
font-family: @family; | |
src:url('/fonts/@{file}.eot'); | |
src:url('/fonts/@{file}.eot?#iefix') format('embedded-opentype'), | |
url('/fonts/@{file}.woff') format('woff'), | |
url('/fonts/@{file}.ttf') format('truetype'), | |
url('/fonts/@{file}.svg#icon') format('svg'); | |
font-weight: @weight; | |
font-style: @style; |
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 gulp = require('gulp'), | |
browserSync = require('browser-sync'), | |
mainBowerFiles = require('main-bower-files'), | |
less = require('gulp-less'), | |
filter = require('gulp-filter'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
minifyCss = require('gulp-minify-css'), | |
spritesmith = require('gulp.spritesmith'), | |
del = require('del'), |
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 plural(number, one, two, five) { | |
var number = Math.abs(number); | |
number %= 100; | |
if (number >= 5 && number <= 20) { | |
return five; | |
} | |
number %= 10; | |
if (number == 1) { | |
return one; | |
} |
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
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 | |
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644 |
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
<?php | |
/* | |
echo plural_form(42, array('арбуз', 'арбуза', 'арбузов')); | |
*/ | |
function plural_form($n, $forms) { | |
return $n%10==1&&$n%100!=11?$forms[0]:($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?$forms[1]:$forms[2]); | |
} |