Skip to content

Instantly share code, notes, and snippets.

@RobertoC27
RobertoC27 / ebs-cheatsheet.md
Last active June 21, 2020 19:22
EBS volumes cheatsheet

How to create a filesystem on an EBS volume attached to EC2 instance and make ec2-user owner

Based on the docs found here

Find the device name

$ lsblk # Nitro based output
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1       259:0    0   8G  0 disk
├─nvme0n1p1   259:1    0   8G  0 part /
└─nvme0n1p128 259:2    0   1M  0 part
nvme2n1 259:4 0 40G 0 disk /home/ec2-user/data
@RobertoC27
RobertoC27 / custom-ec2-console-banner.md
Last active June 16, 2020 23:37
Como cambiar el mensaje de inicio de Amazon Linux en EC2

Entrar al directorio donde esta la configuracion

$ cd /etc
$ cd update-motd.d/
# Estos son los archivos que muestran, el numero del inicio define orden. mientras mas bajo mayor prioridad al mostrarlo.
$ ls
# Crear el archivo para mostrat el mensaje de cowsay
$ sudo nano /etc/update-motd.d/40-cow
# Agregar el codigo de abajo para que diga lo que queremos el banner
@RobertoC27
RobertoC27 / install.md
Last active May 9, 2020 23:24
Instalar AdoptOpenJDK en amazon linux 2 y tomcat8.5 (extra)

Pasos para instalar adoptopenjdk en amazon linux 2

  1. Actualizar yum
$ sudo yum update -y
  1. abrir una terminal de root
$ sudo -i
@RobertoC27
RobertoC27 / Tips.md
Last active January 22, 2021 00:35
Setup Windows Subsystem for Linux (WSL) using Ubuntu 18.04 LTS, to do DApp development (web + blockchain)

Installation tips for using Windows Subsystem for Linux (WSL) using Ubuntu 18.04 LTS

and also setting up to do some blockchain development

Preparing for web development using WSL, I have taken from other sources and condensed it to save some time. This intends to be a quick setup guide, if you want and in-depth explanation go ahead and open the links at the bottom. I do not intend to take credit from them, links will be at the bottom.

How to enable this feature

  1. Go into "Turn Windows features on or off" and scroll down to Windows Subsystem for Linux and check the box. You will need to restart your PC
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>test</title>
</head>
<body>
@RobertoC27
RobertoC27 / Faucet.sol
Last active October 25, 2018 02:29
metamask balance issue
pragma solidity ^0.4.18;
contract Faucet {
address public owner;
address public owner2;
bool public available;
mapping (address => bool) fundedAccounts;
@RobertoC27
RobertoC27 / EducationToken.sol
Created September 22, 2018 03:46
contratos token educacion
pragma solidity ^0.4.20;
import "./AccessControl.sol";
import "../node_modules/openzeppelin-solidity/contracts/ownership/Ownable.sol";
contract EducationToken is Ownable{
string public name;
string public description;
@RobertoC27
RobertoC27 / ABI (Titulo de propiedad)
Last active August 28, 2018 18:04
code snippets for UVG lab
[
{
"constant": true,
"inputs": [],
"name": "creator",
"outputs": [
{
"name": "",
"type": "address"
}
@RobertoC27
RobertoC27 / log.txt
Created June 28, 2018 05:05
error log for truffle@next debugger
C:\Users\fantasma\Desktop\darq-debug>.\node_modules\.bin\truffle console
truffle(development)> debug 0xe773a9874e509e26cec7b89bb56dacac1efb7d6661b20b388fc4810b2f1791cc
Compiling .\contracts\Fibonacci.sol...
Compiling .\contracts\Migrations.sol...
Gathering transaction data...
redux-saga error: uncaught at session.saga
at session.saga
TypeError: Cannot destructure property `sourcePath` of 'undefined' or 'null'.
@RobertoC27
RobertoC27 / ArgumentsTest.sol
Last active June 10, 2018 18:54
Resources to reproduce darq-truffle sender not updating
pragma solidity ^0.4.23;
contract ArgumentsTest {
function noArgs () view public returns (address) {
return msg.sender;
}
function singleArg(uint16 foo) view public returns (address) {
return msg.sender;