Skip to content

Instantly share code, notes, and snippets.

@nerdinand
nerdinand / Dockerfile
Created January 29, 2022 22:32
Podman setup for Rails 7 (without compose or database)
FROM ruby:3.1
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
@kaaquist
kaaquist / podman_macos.md
Last active July 29, 2024 09:13
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@alexanderjsingleton
alexanderjsingleton / ethereum-staking-testnet.md
Last active June 5, 2024 14:07
ethereum-staking-testnet.md

alexanderjsingleton's Ethereum 2.0 Staking Guide for Goerli Test-Net with Prysm and Digital Ocean

Introduction

After searching for legit ethereum staking-guides, the best proved to be EatTheBlock's demonstration via YouTube. Although I attempted several times, I think I finally set-up a test validator as of today (12/22/2020); I'll post his tutorial within a blog-post I plan to release within the next few weeks- for now, enjoy this gist and my corresponding sreencast via YouTube!

Create Directory for prysm

  1. mkdir prysm && cd prysm within a dedicated subdirectory (eg: '/home/alexanderjsingleton/shinebox').
@aquaflamingo
aquaflamingo / rails_conventions_cheatsheet.md
Last active May 29, 2021 18:32
Rails controller, model, view conventions and naming plural v. single

Rails Conventions Cheatsheet

Taken from https://alexander-clark.com/blog/rails-conventions-singular-or-plural

Concept Plural or Singular Command Example
Controller Plural rails g controller Users index show
Helper Plural rails g helper Users
Mailer Singular rails g mailer UserMailer
Migration Plural rails g migration AddEmailToUsers email:string
Model Singular rails g model User name:string
@aquaflamingo
aquaflamingo / vim_for_ruby.md
Last active June 2, 2019 15:22
Vim for ruby shortcuts and notes

Vim for Ruby 💎

Notes from the Vim for Ruby udemy course.

Navigation

  • End of the file: shift + g
  • Next line: j
  • Go down a defined number of lines: number + j
  • Skip to next word: w
@aquaflamingo
aquaflamingo / mastering_ethereum_notes.md
Last active May 15, 2019 17:06
Notes from Mastering Ethereum

Mastering Ethereum

By Andreas M. Antonopoulos, Dr. Gavin Wood

Available under at Creative Commons CC-BY-NC-ND license and readable at Mastering Ethereum

@erdostom
erdostom / Dockerfile
Last active November 25, 2022 14:53
Good starter Dockerfile + docker-compose.yml for Rails 6.
FROM ruby:2.6.5-alpine
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn
RUN gem install bundler:2.1.4
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --check-files
@aquaflamingo
aquaflamingo / 1-Apache-Kafka-Vagrant-Ubuntu-16-04.md
Last active August 26, 2018 03:01
Setup Apache Kafka server on Vagrant Ubuntu 16.04 image.

➶ Ubuntu 16.04 Vagrant + Apache Kafka [Guide]

Prerequisite

Install virtualbox, install vagrant

Setup Vagrant Box + Config

Init Box:

@rasmar
rasmar / .config.yml
Last active August 5, 2019 03:05
Frontend E2E Circle 2.0 config
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:8.2.1
version: 2
jobs:
checkout_code:
<<: *defaults
steps:
@dominiek
dominiek / ethereum_web3_signing.js
Created February 16, 2018 02:51
Ethereum Web3 Signing
const message = web3.sha3('Hello World');
const signature = await web3.eth.sign(account, message);
const { v, r, s } = ethUtil.fromRpcSig(signature);