Skip to content

Instantly share code, notes, and snippets.

View amikishiyev's full-sized avatar

Zaur Amikishiyev amikishiyev

  • Baku, Azerbaijan
View GitHub Profile
#!/bin/sh
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{"persistent": {"cluster.blocks.create_index": false}}'
echo
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
echo
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
echo
curl -XGET -H "Content-Type: application/json" http://localhost:9200/_cat/indices?v
@amikishiyev
amikishiyev / keybase.md
Created March 22, 2018 12:54
keybase.md

Keybase proof

I hereby claim:

  • I am amikishiyev on github.
  • I am amikishiyev (https://keybase.io/amikishiyev) on keybase.
  • I have a public key ASAlt9ZFchY4BCTWgUnnA4uJ0kHaLECf3VgzW73ThIhGcQo

To claim this, I am signing this object:

@amikishiyev
amikishiyev / active_record_objects_autosave.md
Created March 21, 2017 15:27 — forked from demisx/active_record_objects_autosave.md
When Active Record Child Objects are Autosaved in Rails

belongs_to:

  1. Assigning an object to a belongs_to association does not automatically save the object. It does not save the associated object either.

has_one:

  1. When you assign an object to a has_one association, that object is automatically saved (in order to update its foreign key).
  2. In addition, any object being replaced is also automatically saved, because its foreign key will change too
  3. If either of these saves fails due to validation errors, then the assignment statement returns false and the assignment itself is cancelled.
  4. If the parent object (the one declaring the has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.
@amikishiyev
amikishiyev / rainforestHelper.js
Created November 8, 2016 21:40 — forked from sweeneyapps/rainforestHelper.js
Rainforest Tampermoney Userscript
// ==UserScript==
// @name Rainforest Helper
// @namespace http://www.sweeneyapps.com/
// @version 0.1
// @description Stuff for Rainforest workers
// @author Paul Sweeney Jr.
// @match https://tester.rainforestqa.com/tester/*
// @grant none
// @run-at document-start
// ==/UserScript==