Skip to content

Instantly share code, notes, and snippets.

View s-belichenko's full-sized avatar

Stas B. s-belichenko

  • Russia, Mocsow
View GitHub Profile
@s-belichenko
s-belichenko / Dockerfile.local
Last active February 20, 2020 08:43
Docker files for xdebug (alpine, nginx)
RUN apt update \
&& apt -y install gcc make autoconf \
&& mkdir ~/xdebug \
&& cd ~/xdebug \
&& wget http://xdebug.org/files/xdebug-2.7.2.tgz \
&& tar -xvzf xdebug-2.7.2.tgz \
&& cd xdebug-2.7.2 \
&& phpize \
&& ./configure \
&& make \
@s-belichenko
s-belichenko / convert.sh
Created January 31, 2019 07:31 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.md" -o -name "*.ru" -o -name "*.en" -type f |
while read file
do
@s-belichenko
s-belichenko / colored_prompt.sh
Created October 25, 2018 08:37
Colored prompt for vagrant user in CentOS
# echo "==> Colored prompt"
echo "force_color_prompt=yes" >> /home/vagrant/.bashrc
echo "color_prompt=yes" >> /home/vagrant/.bashrc
echo "PS1='\t \[\033[02;32m\]\u@\H:\[\033[02;34m\][\w]\$\[\033[00m\] '" >> /home/vagrant/.bashrc
#!/bin/bash
#########################################################
#
# Bootstrap script v1.0.0 for Vagrant scotch/box 3.5.0 (Ubuntu 16.04.2 LTS)
# Purpose: Nginx + PHP7.0-FPM
#
#########################################################
echo "========== Uninstalling Apache & Installing Nginx =========="
@s-belichenko
s-belichenko / package-gulp_js+css.json
Last active September 30, 2018 21:55
For Gulp: JS (ECMAScript 5.1) + CSS
{
"name": "loans-form",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "gulp"
},
"repository": {
"type": "git",
@s-belichenko
s-belichenko / gulpfile_js+css+sass.js
Last active September 30, 2018 21:55
JS (ECMAScript 5.1) + CSS + Sass
// Gulp plugins
var gulp = require('gulp'),
minifyCSS = require('gulp-csso'),
merge = require('merge-stream'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
stripDebug = require('gulp-strip-debug');
# -*- mode: ruby -*-
# vi: set ft=ruby :
#########################################################
#
# Vagrant file v1.0.0 for scotch/box
# Vagrant version: 2.0.0 and later
#
#########################################################
@s-belichenko
s-belichenko / gulpfile_js+css.js
Last active September 30, 2018 21:56
JS (ECMAScript 5.1) + CSS
// Gulp plugins
var gulp = require('gulp'),
minifyCSS = require('gulp-csso'),
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
stripDebug = require('gulp-strip-debug');
// env variables
var front_folder = 'web',
@s-belichenko
s-belichenko / bootstrap-scotch3.5.0-apache2-php7.1.sh
Last active September 29, 2018 19:33
Preparing Vagrant box via bootstrap script (scotch/box 3.5.0, purpose: apache2 + php 7.1)
#!/bin/bash
#########################################################
#
# Bootstrap script v1.0.0 for Vagrant scotch/box 3.5.0 (Ubuntu 16.04.2 LTS)
# Purpose: PHP 7.1
#
#########################################################
echo "================== Installing PHP 7.1 ====================="
@s-belichenko
s-belichenko / bootstrap-scotch3.5.0-apache2-php7.0.sh
Last active September 29, 2018 19:32
Preparing Vagrant box via bootstrap script (scotch/box 3.5.0, purpose: apache2 + php 7.0)
#!/bin/bash
#########################################################
#
# Bootstrap script v1.0.1 for Vagrant scotch/box 3.5.0 (Ubuntu 16.04.2 LTS)
# Purpose: PHP 7.0
#
#########################################################
echo "==================== Set up php vars ======================"