Skip to content

Instantly share code, notes, and snippets.

Adis Osmonov adis-io

View GitHub Profile
@adis-io
adis-io / upgrade_to_mysql57.sh
Last active Apr 5, 2019 — forked from bufordtaylor/upgrade_to_mysql57.sh
Upgrading from MySQL 5.6 to 5.7 on OS X
View upgrade_to_mysql57.sh
mysql.server stop # kill the process if it fails
brew uninstall mysql56
brew update
brew install mysql@5.7
brew link mysql@5.7 --force
mysql.server stop
brew services start mysql # don't run via tmux
mysql_upgrade -u root --force
brew services restart mysql # don't run via tmux
cd ~/Code/17hats/17hats
View ansible-cheatsheet.md

Debug

---
- name: Prepare server(s)
  hosts: servers
  gather_facts: False
  tasks:
    - debug:
        msg: "wut"
View keybase.md

Keybase proof

I hereby claim:

  • I am adis-io on github.
  • I am adiso (https://keybase.io/adiso) on keybase.
  • I have a public key ASD8EXUCFkqysD2V3MsYAfgXQ4WKQgZh_TXL0K62XSk0pAo

To claim this, I am signing this object:

View custom_bundler.plugin.zsh
alias be="bundle exec"
alias bl="bundle list"
alias bp="bundle package"
alias bo="bundle open"
alias bout="bundle outdated"
alias bu="bundle update"
alias bi="bundle_install"
alias bcn="bundle clean"
bundled_commands=(
View load_tests.diff
diff --git a/lib.sh b/lib.sh
index bb61978..e040782 100755
--- a/lib.sh
+++ b/lib.sh
@@ -13,26 +13,35 @@ run_test () {
test=$1
iterations=$2
vus=$3
- docker run --rm \
- -v ${PWD}/tests:/tests \
@adis-io
adis-io / fork_break_usage_example.rb
Created Dec 12, 2017
github.com/forkbreak/fork_break - usage example
View fork_break_usage_example.rb
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
@adis-io
adis-io / README
Last active Aug 15, 2017
Производительность использования текстового и UUID типа в postgres
View README
Запуск тестов:
~ createdb text_vs_uuid
~ ruby text_vs_uuid.rb
Тесты:
MacBook i7 16 GB:
== WITHOUT INDEX ==
NOTICE: extension "uuid-ossp" already exists, skipping
@adis-io
adis-io / text_vs_uuid.rb
Created Aug 15, 2017
~ createdb text_vs_uuid
View text_vs_uuid.rb
begin
require 'pg'
require 'benchmark'
rescue LoadError
$stderr.puts "You don't have gem pg installed in your system. Please use `gem install pg` to install it"
raise
end
class TextVSUUID
DB_NAME = 'text_vs_uuid'
@adis-io
adis-io / json_api_client_vs_her_rb.md
Last active Apr 22, 2017
JsonApiClient vs Her Rb for using with json_api
View json_api_client_vs_her_rb.md

JsonApiClient

Pros

Cons

Her Rb

Pros

@adis-io
adis-io / config.ru
Created Jan 25, 2017 — forked from Epictetus/config.ru
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
View config.ru
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
require "rails"
# Let's load only action controller. If you want
# to use active record, just require it as well.
require "action_controller/railtie"
class MyApp < Rails::Application
You can’t perform that action at this time.