Skip to content

Instantly share code, notes, and snippets.

View MistaTwista's full-sized avatar

Maxim Kern MistaTwista

  • Saint-Petersburg
View GitHub Profile
authors state
Sean Chittenden <[email protected]>
abandoned

RFD 106 Engineering Guide - Go Best Practices

@MistaTwista
MistaTwista / # redis - 2018-03-30_16-08-36.txt
Created March 30, 2018 16:20
redis on Ubuntu 16.04.4 LTS - Homebrew build logs
Homebrew build logs for redis on Ubuntu 16.04.4 LTS
Build date: 2018-03-30 16:08:36
@MistaTwista
MistaTwista / script.js
Created March 27, 2018 17:57
Tilda remove logo section and copyright
<script type="text/javascript">
// if for some reason you need to remove bottom tilda logo
// you can add block with HTML from Other -> Html code with all this code from script to script
//
var blockWithScript = 'rec48580173';
var t = 'lda';
$(document).ready(function() {
$('#ti' + t + 'cop' + 'y').remove(); // remove copyright id block
$('#' + blockWithScript).remove(); // remove block with script after page load
});
@MistaTwista
MistaTwista / tmux.conf
Created August 25, 2017 14:08 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@MistaTwista
MistaTwista / prompt.js
Created April 20, 2017 14:40
Integrating prompts into shipit deployment scripts
var inquirer = require('inquirer');
shipit.blTask('wipeDB', function(callback) {
var dbPath = path.join(shipit.config.deployTo, 'shared', 'storage', 'db.sqlite3');
inquirer.prompt({
type: 'confirm',
name: 'wipeConfirmation',
default: false,
message: 'Here be dragons! Running this will wipe the production database. This is not recoverable. Are you sure?'
}, function(answer) {
@MistaTwista
MistaTwista / capybara.md
Created July 19, 2016 13:23 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
git fetch --all
git reset --hard origin/master
git pull origin master
@MistaTwista
MistaTwista / application.rb
Last active April 20, 2017 14:41
Rails 4 ActionMailer tabless model/controller/view
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: "<example.tld>",
user_name: "<username>",
password: "<password>",
authentication: :plain,
enable_starttls_auto: true
}
@MistaTwista
MistaTwista / Ruby_finance_testcase.md
Created October 3, 2015 11:54 — forked from beshkenadze/Ruby_finance_testcase.md
Тестовое задание для Ruby-разработчика

Задание

Реализовать на Ruby с использованием Rails приложение со следующим функционалом:

  1. Регистрация / авторизация пользователей.
  2. Создание портфеля акций (5-6 акций достаточно) для пользователя: стандартный CRUD.
  3. Данные должны скачиваться с Yahoo Finance.
  4. Сделать вывод графика "стоимость портфеля от времени" за 2 последних года по выбранным в п.2 акциям.

Требования

@MistaTwista
MistaTwista / 0. nginx_setup.sh
Created September 30, 2015 18:17 — forked from mikhailov/0. nginx_setup.sh
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#