Skip to content

Instantly share code, notes, and snippets.

View overdrive3000's full-sized avatar
🇻🇪
de venezuela pa' españa

Juan Manuel Mesa overdrive3000

🇻🇪
de venezuela pa' españa
View GitHub Profile
@overdrive3000
overdrive3000 / Terraform Graph
Created February 12, 2016 15:35
Graphviz graph in dot format generated by Terraform
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] aws_autoscaling_group.ecs_asg" [label = "aws_autoscaling_group.ecs_asg", shape = "box"]
"[root] aws_autoscaling_policy.asg_policy" [label = "aws_autoscaling_policy.asg_policy", shape = "box"]
"[root] aws_cloudwatch_metric_alarm.cpu_alarm" [label = "aws_cloudwatch_metric_alarm.cpu_alarm", shape = "box"]
"[root] aws_db_instance.wordpress-db" [label = "aws_db_instance.wordpress-db", shape = "box"]
"[root] aws_db_subnet_group.default" [label = "aws_db_subnet_group.default", shape = "box"]
"[root] aws_ecs_cluster.wordpress-cluster" [label = "aws_ecs_cluster.wordpress-cluster", shape = "box"]
#########################################################################
# 10-row School abacus
# by
# Michael H
#########################################################################
# Description partially extracted from from wikipedia
#
# Around the world, abaci have been used in pre-schools and elementary
#
# In Western countries, a bead frame similar to the Russian abacus but
failed: [localhost] => (item=pp-edi) => {"changed": true, "cmd": "bash -lc \"cd /var/www/pp-edi/releases/20151008014442/; bundle install\"", "delta": "0:00:16.737223", "end": "2015-10-08 01:47:12.374375", "item": "pp-edi", "rc": 5, "start": "2015-10-08 01:46:55.637152", "warnings": []}
stdout: Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Fetching [email protected]:PurchasingPlatform/as2.git
Fetching [email protected]:PurchasingPlatform/pp-client.git
Installing rake 10.2.1
Using i18n 0.6.11
Installing multi_json 1.10.1
Installing activesupport 3.2.19
Verifying that +overdrive is my blockchain ID. https://onename.com/overdrive
@overdrive3000
overdrive3000 / route53.yml
Created September 30, 2015 13:08
Modify Route53 record using Ansible in a private hosted zone
---
- name: Debug
hosts: localhost
tasks:
- debug: var=ansible_eth0["ipv4"]["address"]
- name: Get DNS record information
hosts: localhost
tasks:
- route53: command=get zone=foo.com record=subdomain.foo.com type=A private_zone=true
@overdrive3000
overdrive3000 / ansible_tags.yml
Last active August 30, 2015 07:44
Validate an EC2 instance by tag with Ansible
---
- hosts: localhost
tasks:
- name: Gather facts
action: ec2_facts
register: ami_id
- name: Print AMI ID
debug: msg={{ ami_id['ansible_facts']['ansible_ec2_instance_id'] }}
@overdrive3000
overdrive3000 / rubyp451.patch
Created August 6, 2015 15:17
Ruby p451 patch
diff --git ext/readline/extconf.rb ext/readline/extconf.rb
index 4920137..8e81253 100644
--- ext/readline/extconf.rb
+++ ext/readline/extconf.rb
@@ -19,6 +19,10 @@ def readline.have_func(func)
return super(func, headers)
end
+def readline.have_type(type)
+ return super(type, headers)
@overdrive3000
overdrive3000 / gist:2b66dc3bf030505aa7fa
Last active August 29, 2015 14:26
To install ruby p451 with rbenv in Ubuntu 14.04
Run the following command to install ruby p451 in Ubuntu 14.04 with libreadline version 6.3.4
curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 2.0.0-p451
#!/usr/bin/python
import os
import time
import boto
import boto.manage.cmdshell
def launch_instance(ami='ami-a73264ce',
instance_type='t1.micro',
@overdrive3000
overdrive3000 / gist:5dfd4e72791a7a772fad
Created December 19, 2014 20:40
Hello world in assembly!
# ----------------------------------------------------------------------------------------
# helloworld.s. Hello world in assembly!
# ----------------------------------------------------------------------------------------
.global _start
.text
_start:
# write(1, message, 13)
mov $1, %rax # system call ID. 1 is write