Skip to content

Instantly share code, notes, and snippets.

View gravcat's full-sized avatar

poppoppop gravcat

View GitHub Profile
@gravcat
gravcat / docker-compose.yml
Created July 22, 2018 06:21
grafana really fast
version: "3"
services:
grafana:
image: grafana/grafana:5.2.1
ports:
- "3000:3000"
environment:
- HTTP_USER=admin
- HTTP_PASS=admin
@gravcat
gravcat / parity-docker-compose.yml
Last active July 22, 2018 04:49
docker-compose -f parity-docker-compose.yml up -d
version: '3.1'
volumes:
parity:
services:
parity:
image: parity/parity:stable
container_name: parity
volumes:
#############################
# ec2 instance
#############################
resource "aws_instance" "nt-test-ec2" {
count = 1
ami = "${lookup(var.ami, var.region)}"
instance_type = "t2.medium"
key_name = "${var.key_pair_name}"
#ebs_optimized = true
import mechanize
import requests
import random
from random import randrange
scammers_url = 'https://baddies.online.notarealtld/'
word_list_url = 'https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt'
useragents = ['Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36', 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0']
runs = 1
@gravcat
gravcat / parity-locked-up.log
Created June 21, 2018 16:14
parity locking up with errors importing transactions
9|parity-1 | 2018-06-21 15:54:10 UTC Transaction mined (hash 11fde9bbadc35937591955fa4504b19f01146b91d0b0a48c5c0a9ea5bc52901b)
9|parity-1 | 2018-06-21 15:54:10 UTC Transaction mined (hash e12412a00b14cc71cf1160134fcee98f96aa53db25e1fbd51744207251181f12)
9|parity-1 | 2018-06-21 15:54:11 UTC Imported #5829245 3954…96d8 (76 txs, 8.00 Mgas, 697.51 ms, 18.92 KiB)
9|parity-1 | 2018-06-21 15:54:21 UTC Imported #5829247 dd52…6bd7 (138 txs, 7.99 Mgas, 1236.34 ms, 20.41 KiB)
9|parity-1 | 2018-06-21 15:54:28 UTC 51/100 peers 6 MiB chain 120 MiB db 0 bytes queue 63 KiB sync RPC: 0 conn, 7 req/s, 132 µs
9|parity-1 | 2018-06-21 15:54:28 UTC 51/100 peers 6 MiB chain 120 MiB db 0 bytes queue 63 KiB sync RPC: 0 conn, 7 req/s, 132 µs
9|parity-1 | 2018-06-21 15:54:39 UTC Imported #5829248 f405…bfd0 (82 txs, 7.96 Mgas, 630.54 ms, 17.43 KiB) + another 1 block(s) containing 23 tx(s)
9|parity-1 | 2018-06-21 15:54:45 UTC Transaction mined (hash 342ce6f0bfcb5ed70897e4209e6d0a57070fc924571945febec36de41b438
#
# up in the aws_instance.mycoolinstance resource:
# iam_instance_profile = "${aws_iam_instance_profile.cloudwatch_logs.name}"
#
resource "aws_iam_instance_profile" "cloudwatch_logs" {
name = "cloudwatch_logs"
role = "${aws_iam_role.cloudwatch.name}"
}
@gravcat
gravcat / install.yml
Last active June 16, 2018 06:55
-- forked to save the docker_volume return data register example usage -- Integración entre Ansible y Docker http://picodotdev.github.io/blog-bitix/2014/11/integracion-entre-ansible-y-docker/
---
- hosts: devbox
- name: start docker service
service: name=docker state=started
sudo: true
- name: build docker images
docker_image: name="{{ item.name }}" tag="{{ item.tag }}" state="present" path={{ item.path }}
with_items:
- { name: "picodotdev/base", tag: "1.0", path: "../docker/base" }
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@gravcat
gravcat / ec2-snippet.tf
Created April 27, 2018 20:29
install docker so fast on an ec2 instance you won't know what to do with yourself
provisioner "remote-exec" {
inline = [
"sudo apt-get update -y",
"sudo apt-get upgrade -y",
"sudo apt install python2.7 -y",
"sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1",
"curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -",
"sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"",
"sudo apt-get update",
"sudo apt-get install -y docker-ce"
@gravcat
gravcat / ec2.tf
Last active October 5, 2020 07:34
create ec2 instance with supporting resources and security rules
#############################
# ec2 instance
#############################
resource "aws_instance" "my-cool-instance" {
count = 1
ami = "${lookup(var.ami, var.region)}"
instance_type = "t2.micro"
key_name = "${var.key_pair_name}"
ebs_optimized = true