Skip to content

Instantly share code, notes, and snippets.

TerraChecks

Скрипты для сравнения состояния OpenStack-облака Селектела, записей DNSimple и соответствующих файлов состояния терраформа.

Usage

  1. Добавить в корень этот проекта файл secret.yml:
@avakhov
avakhov / box01.tf
Last active December 4, 2019 10:36
resource "openstack_blockstorage_volume_v1" "disk-for-box01" {
name = "disk-for-box01"
region = "ru-1"
size = 10
image_id = "${var.image_list["ubuntu-x64-1604"]}"
volume_type = "basic.ru-1a"
}
resource "openstack_compute_instance_v2" "box01" {
name = "box01"
require "rubygems"
require "active_record"
ActiveRecord::Base.establish_connection "postgres://localhost/geo"
ActiveRecord::Base.connection.create_table("planets") do |t|
t.string :name
end
ActiveRecord::Base.connection.create_table("countries") do |t|
@avakhov
avakhov / index.html.diff
Last active August 29, 2015 14:11
Diff
diff --git a/index.html b/index.html
index fa2c39f..efdddcd 100644
--- a/index.html
+++ b/index.html
@@ -2,10 +2,16 @@
<html>
<head>
<meta charset="UTF-8">
- <title>Генератор вкусных рецептов</title>
+ <title>Генератор вкусных рецептов - 2</title>
@avakhov
avakhov / index.html
Last active September 15, 2016 09:03
React.js + jQuery UI Sortable
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Генератор вкусных рецептов - 2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>
<script src='http://fb.me/react-0.12.1.js'></script>
<script src='http://fb.me/JSXTransformer-0.12.0.js'></script>
<script src='https://code.jquery.com/jquery-1.11.1.min.js'></script>
@avakhov
avakhov / _comment.mustache
Created July 30, 2012 12:14
For blog - comment
<li>
{{text}}
{{^empty}}<ul>{{/empty}}
{{#children}}
{{> comment}}
{{/children}}
{{^empty}}</ul>{{/empty}}
</li>
@avakhov
avakhov / _comments.mustache
Created July 30, 2012 12:13
For blog - comments
<div class="comments">
<ul>
{{#comments}}
{{> comment}}
{{/comments}}
</ul>
</div>
@avakhov
avakhov / role.rb
Created March 16, 2012 07:18
alias_method_chain
class Role < ActiveRecord::Base
belongs_to :user
end
@avakhov
avakhov / ability_rules.rb
Created August 27, 2011 19:18
six gem usage
class AbilityRules
class AccessDenied < Exception
end
def self.allowed(user, subject)
rules = []
railse [user, subject].inspect # <--- this exception was rescued by six rescue block (of course it need only in development for debug :)
return rules unless user