Skip to content

Instantly share code, notes, and snippets.

View JuPlutonic's full-sized avatar
💭
🍺

AMZ JuPlutonic

💭
🍺
  • Msk, Russian Fed.
View GitHub Profile
@JuPlutonic
JuPlutonic / install_perl_software.sh
Last active November 25, 2019 11:45 — forked from ashwinvis/install_stow.sh
GNU stow and youtube-viewer (absent in CPAN) installation.
#!/bin/bash
# Set up CPAN, cpanm, youtube-viewer, po4a[x], stow
# Append the following lines to .bashrc / .profile
# PERL_DIR=$HOME/.perl
# export PERL_LOCAL_LIB_ROOT=$PERL_DIR:${PERL_LOCAL_LIB_ROOT}
# export PATH=$PERL_DIR/bin:$PATH
# export PERL5LIB=$PERL_DIR/lib/perl5
# PERL_MB_OPT="--install_base \"${PERL_DIR}\""; export PERL_MB_OPT;
# PERL_MM_OPT="INSTALL_BASE=${PERL_DIR}"; export PERL_MM_OPT;
@JuPlutonic
JuPlutonic / docker-compose.sh
Last active September 25, 2019 22:22 — forked from Enteee/docker-compose.sh
A `docker-compose` wrapper for multiple configuration files with relative paths
#!/usr/bin/env bash
# Docker compose wrapper with submodule support
# Reads all docker-compose.yaml files given with -f / --files and compiles one
# big docker-compose.yaml file before running docker-compose.
#
# This is useful when you have nested docker-compose subprojects in different
# folders which contain relative paths.
# see: https://github.com/docker/compose/issues/3874
#
# Environment:
@JuPlutonic
JuPlutonic / rails_app_workflow.md
Created September 5, 2019 14:03 — forked from lorenadl/rails_app_workflow.md
Rails app workflow

Единственная запара возникла при подключении иконок к рельс6, решается так (app/javascript/packs/fa.scss)

@import "bulma/bulma";

$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/solid'; // fas prefix
@import '~@fortawesome/fontawesome-free/scss/brands'; // fab prefix
// see https://fontawesome.com/how-to-use/with-the-api/setup/importing-icons for more prefixes
@steps_path = ENV['STEPS_PATH']
@features_path = ENV['FEATURES_PATH']
@steps_array = []
@unused_steps = []
def steps_files(path)
Dir[path + '**/*.rb']
end
def features_files(path)
@JuPlutonic
JuPlutonic / capybara cheat sheet
Created March 5, 2019 19:23 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@JuPlutonic
JuPlutonic / Interviewing_15 Questions to Ask During a Ruby Interview.md
Created February 6, 2019 09:18 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

GnuPG Packaging

A few items here assume zsh as shell (globs and expansion modifiers, print -l).

Required installation order:

Previously recorded:
gmp nettle gnutls npth libgpg-error libgcrypt libksba libassuan  ( pinentry , gnupg )
@JuPlutonic
JuPlutonic / monit.rc
Created May 25, 2018 13:25 — forked from vkurennov/monit.rc
Пример конфига для запуска процессов через monit
### Nginx ###
check process nginx with pidfile /opt/nginx/logs/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 127.0.0.1 port 80 protocol http
then restart
if 3 restarts within 5 cycles then timeout
@JuPlutonic
JuPlutonic / pg_9.6_to_10_scripts.txt
Last active February 6, 2019 09:13 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql