Skip to content

Instantly share code, notes, and snippets.

View bibendi's full-sized avatar

Misha Merkushin bibendi

View GitHub Profile
# ===== Common side in gem apress-api
Rails.application.routes.draw do
scope module: "apress", constraints: {domain: :current} do
namespace "api/v1" do
post 'callbacks/:service' => 'callbacks#create'
end
end
end
@bibendi
bibendi / README.md
Last active May 8, 2018 05:03
Kontena rails app

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
require 'benchmark/ips'
require 'open-uri'
require 'bigdecimal'
require 'bigdecimal/math'
class Contract
DIGITS = 10_000
URL = 'http://www.nooooooooooooooo.com/'.freeze
def call(parallel_io_only:, cpu_count:, io_count:)

Keybase proof

I hereby claim:

  • I am bibendi on github.
  • I am bibendi (https://keybase.io/bibendi) on keybase.
  • I have a public key ASDynTp-5ubsrL1hm6jHzh0KkUbBfmCcb-sn_JLrSVU_awo

To claim this, I am signing this object:

@bibendi
bibendi / _service.md
Created August 25, 2018 14:40 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@bibendi
bibendi / Capybara.md
Created September 3, 2018 06:11 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@bibendi
bibendi / ubuntu_agnoster_install.md
Created September 6, 2018 10:38 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@bibendi
bibendi / docker-ssh-forward.bash
Created February 17, 2016 18:06 — forked from d11wtq/docker-ssh-forward.bash
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@bibendi
bibendi / unwatch.rb
Last active November 1, 2018 17:34
Unwatch all Organization's repositories
require "octokit"
client = Octokit::Client.new(access_token: "")
client.auto_paginate = true
client.organization_repositories('abak-press', type: 'all').each do |repo|
client.delete_subscription(repo.id)
client.forks(repo.id).each do |fork|
client.delete_subscription(fork.id)
@bibendi
bibendi / README.md
Created April 16, 2019 14:45 — forked from seebk/README.md
Extract embedded certificates and keys from OpenVPN config files

This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.

Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).

Instructions:

  • Make shure all the required packages are installed. For example on Ubuntu and Debian run:

    $ sudo apt-get install python3 network-manager-openvpn-gnome