Skip to content

Instantly share code, notes, and snippets.

Stanislav Popov popstas

Block or report user

Report or block popstas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View windows-activate
#!/bin/bash
# http://blog.popstas.ru/blog/2015/11/16/show-all-terminal-windows-in-ubuntu/
# Activate all windows with process name of currently active window
# Получить текущее активное окно, его pid, имя процесса
current_pid=$(xdotool getwindowpid $(xdotool getactivewindow))
current_name=$(ps -p $current_pid -o comm=)
clean_name=${current_name%-}
name=${1:-$clean_name}
View heidisql.md

Оф. сайт - http://www.heidisql.com/

#Добавление сервера Делается через ssh туннель По вкладкам:

Настройки:

  • Тип сети: MySQL (SSH tunnel)
  • Имя хоста: localhost
  • Пользователь: юзер_mysql
View gist:598e839e6a129e7e5ded
dirty-git ~/projects/
ansible/bak_ansible-server (master)
30 modified, 3 deleted, 35 untracked
ansible/ansible-server_2 (master)
10 modified, 9 untracked
ansible/backup_ansible-aws (master)
48 modified, 56 untracked
@popstas
popstas / drupal_digest.md
Last active Feb 21, 2016
Drupal Digest from Habrahabr, best for novices
View drupal_digest.md
@popstas
popstas / average.sh
Created Feb 28, 2016
Measure average script time execution
View average.sh
#!/bin/bash
set -eu
if [ "$#" != 1 ] && [ "$#" != 2 ]; then
echo "Usage:
# run 'command' with 5 cycles
average 'command'
# run 'command' with 3 cycles
View gulpfile.js
'use strict';
var argv = require('yargs').argv;
var autoprefixer = require('autoprefixer');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var debug = require('gulp-debug');
var duration = require('gulp-duration');
var gulp = require('gulp');
var gulpif = require('gulp-if');
View phpstorm-eap-update.sh
#!/bin/bash
# blog post (rus) - http://blog.popstas.ru/blog/2016/01/17/automacic-update-phpstorm-eap-on-mac-os/
# usage: just run it!
set -euo pipefail
get_phpstorm_url() {
download_page="https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program"
url=$(curl -s "$download_page" | grep -oE "http:\/\/[a-zA-Z0-9\.\/-]+\.dmg")
echo "$url"
@popstas
popstas / ansible.sh
Created Mar 26, 2017
Build docker and vagrant images with packer and ansible
View ansible.sh
#!/bin/bash -eux
# Install Ansible repository.
apt -y update && apt-get -y upgrade
apt -y install software-properties-common
apt-add-repository ppa:ansible/ansible
# Install Ansible.
apt -y update
apt -y install ansible
@popstas
popstas / jetbrains custom hotkeys.md
Last active Apr 6, 2017
Jetbrains custom hotkeys
View jetbrains custom hotkeys.md

jetbrains custom hotkeys

Hotkey Action
ctrl+wheel EditorDecreaseFontSize
ctrl+shift+d EditorDuplicate
ctrl+wheel EditorIncreaseFontSize
ctrl+0 EditorResetFontSize
ctrl+w, ctrl+lkm EditorSelectWord
ctrl+y $Redo
You can’t perform that action at this time.