Skip to content

Instantly share code, notes, and snippets.

View Tensho's full-sized avatar

Andrew Babichev Tensho

View GitHub Profile
@Tensho
Tensho / security_policy.tf
Last active October 25, 2024 15:02
Terrafrom Google Provider - Cloud Armor (Compute) Security Policy Rules Drift
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 6.8"
}
}
}
resource "google_compute_security_policy" "default" {
@Tensho
Tensho / ssh.plist
Created July 12, 2019 15:45
Add ssh keys to agent on boot
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ssh-add-a</string>
<key>ProgramArguments</key>
<array>
<string>ssh-add</string>
<string>-A</string>
@Tensho
Tensho / woody_woodp[A]cker.json
Last active July 11, 2019 09:05
Packer Test Stand
# https: //www.packer.io/docs/templates/engine.html
{
"description": "Stand",
"min_packer_version": "1.4.1",
"variables": {
"version": "v0.0.1"
},
"builders": [
{
"type": "null",
@Tensho
Tensho / debug-output
Created January 31, 2019 14:46
Terraform remote-exec provisioner glitch
module.instance.aws_instance.precious: Provisioning with 'remote-exec'...
module.instance.aws_instance.precious (remote-exec): Connecting to remote host via SSH...
module.instance.aws_instance.precious (remote-exec): Host: 100.100.100.100
module.instance.aws_instance.precious (remote-exec): User: ubuntu
module.instance.aws_instance.precious (remote-exec): Password: false
2019-01-31T16:06:51.444+0200 [DEBUG] plugin.terraform: remote-exec-provisioner (internal) 2019/01/31 16:06:51 [DEBUG] connecting to TCP connection for SSH
2019-01-31T16:06:51.444+0200 [DEBUG] plugin.terraform: remote-exec-provisioner (internal) 2019/01/31 16:06:51 [DEBUG] Connecting to bastion: 100.100.100.100:22
module.instance.aws_instance.precious (remote-exec): Private key: false
module.instance.aws_instance.precious (remote-exec): SSH Agent: true
module.instance.aws_instance.precious (remote-exec): Checking Host Key: false
class A
def self.count
@count
end
def self.count=(v)
@count = v
end
def initialize

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Tensho
Tensho / feature_checklist.md
Last active June 13, 2017 07:16
Feature Checklist
  • Documentation
  • Implementation
  • Logging
  • Error Handling
  • Unit Tests
  • Integration Tests
  • Linting
@Tensho
Tensho / active_support_base.rb
Created March 13, 2017 21:58
Incredible Active Support
# ========================================
# Deprecations
# ========================================
require 'active_support'
require 'active_support/core_ext/module/deprecation'
class A
def x; 1; end
def y; 2; end
<details>
<summary>Alphabet</summary>
<p>ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
</details>
@Tensho
Tensho / method_source.rb
Last active November 7, 2016 14:48
View source code of a method dynamically in Ruby
require "method_source"
some_object.class.instance_method(:some_method).source.display