Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Merk bibendi

View GitHub Profile
@bibendi
bibendi / gist:1315929
Created Oct 26, 2011
make action and fragment caching of rails 3.0.9 compatible with content_for
View gist:1315929
module ActionController
class Metal
attr_internal :cached_content_for
end
module Caching
module Actions
def _save_fragment(name, options)
return unless caching_allowed?
@bibendi
bibendi / gist:7941823
Created Dec 13, 2013
Оформление коммитов
View gist:7941823

Для оформления сообщения коммита следует использовать следующий шаблон:

<type>(<scope>): <subject>
<BLANK LINE>
<body>

Заголовок

Тип коммита

View gist:9f51c6bbe9ce19f975fa
language: ruby
rvm:
- '1.9.3'
env:
- DEPLOY=shippable PROJECT=ci VERBOSE=1 JOBS=8 RUBY_GC_MALLOC_LIMIT=990000000
services:
- memcached
@bibendi
bibendi / bundler.1.10.5.md
Last active Aug 29, 2015
bundler env 1.10.5
View bundler.1.10.5.md
$ time bundler --version
Bundler version 1.10.5

real	0m42.770s
user	0m42.459s
sys	0m0.273s
View bundler-backtrace.md
$ time bundler --version
^C/home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:237:in `shallow_eql?': Interrupt
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:193:in `block in outgoing_edges'
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:193:in `select'
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:193:in `outgoing_edges'
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:211:in `successors'
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb:251:in `path_to?'
	from /home/merkushin/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.10.5/l
@bibendi
bibendi / tgnotify
Last active Sep 16, 2020
Ruby CLI tool for sending notifications to Telegram
View tgnotify
#!/usr/bin/env ruby
require 'optparse'
options = {}
opt_parser = OptionParser.new do |opt|
opt.banner = 'Usage: tgnotify [OPTIONS] text'
opt.separator ''
opt.separator 'CLI tool for sending notifications to Telegram'
@bibendi
bibendi / docker-ssh-forward.bash
Created Feb 17, 2016 — forked from d11wtq/docker-ssh-forward.bash
How to SSH agent forward into a docker container
View docker-ssh-forward.bash
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@bibendi
bibendi / README.md
Last active May 8, 2018
Kontena rails app
View README.md

Usage

Setup kontena.io

$ gem install kontena-cli
$ kontena login {ip}
$ kontena grid use staging
$ kontena vpn config > kontena.ovpn
$ sudo openvpn --config kontena.ovpn --script-security 2 --daemon
View Dockerfile.1.9.slim-development
FROM ruby:1.9.3-slim
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
locales \
make \
gcc \
g++ \
libxml2-dev \
libxslt-dev \
View cosorter
#!/usr/bin/env ruby
# coding: utf-8
gem "activesupport"
gem "optparse-range"
gem "tty-table"
gem "ascii_charts"
require "optparse"
require "optparse/time"
require "optparse/range"