Skip to content

Instantly share code, notes, and snippets.

name: Deploy Pull Request to Ephemeral Environment
on:
pull_request:
types:
- opened
# - synchronize
- reopened
- closed
jobs:

There are a few ways to run an IPFS node in order to query the IPFS Network for the files you are looking for.

Local Native Installation

  1. Install IPFS which requires installing Go if not already installed. Instructions are simple don't worry :) (Note: carefully read the instructions, choose arm for M1 Silicon Macbooks for example)
  2. Initialize IPFS
  3. In a separate terminal tab run ipfs daemon
  4. Swarm Connect to dClimate IPFS node by runningipfs swarm connect /ip4/45.55.32.80/tcp/4001/ipfs/12D3KooWG7itEPAHut3xsVo7CwyD8sKeQXKgQizotNhPsToCssXQ in a different tab from where you ran ipfs daemon
  5. Test IPNS name resolution of hashes living on the dClimate Node by runningipfs name resolve k2k4r8nyvzboy94mj0eebx9e4ux8qbwoej4q7d6wz1jwagx4rjk76kmw, you should get /ipfs/bafyreie7n7z4xd6go645fbrmyzrdrnaypx6ky4r4iekieyjzlmvo2aqgzm back
  6. Within your
@Faolain
Faolain / raster2zarr.py
Created June 15, 2022 14:14 — forked from lucaswells/raster2zarr.py
Convert GeoTIFF to Zarr array
import matplotlib.pyplot as plt
import rasterio
from rasterio.windows import Window
import time
import zarr
def convert(raster_filepath, chunk_mbs=1):
"""
Converts raster file to chunked and compressed zarr array. Tested
@media only screen and (max-width: 413px) {
}
@media only screen and (min-width: 414px) and (max-width: 767px) {
}
@media only screen and (min-width: 768px) and (max-width: 1023px) {
}
@media only screen and (min-width: 1024px) and (max-width: 1279px) {
@Faolain
Faolain / README.md
Created November 25, 2020 00:05 — forked from sambacha/README.md
A general Boilerplate README file for Improvement Proposals

Boilerplate Proposal README file

Changes

-- Added SECURITY section

-- Added 'Libraries' to ## Terminology

-- Added explicit ## LICENSE section

@Faolain
Faolain / GitHub-Forking.md
Created October 21, 2020 07:28 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Faolain
Faolain / Flexible Dockerized Phoenix Deployments.md
Created November 18, 2018 07:40 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@Faolain
Faolain / phoenix_to_umbrella
Created March 15, 2018 16:35 — forked from emilsoman/phoenix_to_umbrella
How to move an existing phoenix app under an umbrella app
How to convert existing phoenix app to an umbrella app.
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
[10:14]
1) mix new my_umbrella --umbrella
#Docker Container Logs
4/23/2017 9:29:13 PM Node 'hello@10.42.69.252' not responding to pings.
4/23/2017 9:29:14 PM Node 'hello@10.42.69.252' not responding to pings.
4/23/2017 9:29:14 PM Node 'hello@10.42.69.252' not responding to pings.
4/23/2017 9:29:15 PM Node 'hello@10.42.69.252' not responding to pings.
4/23/2017 9:29:16 PM 01:29:16.104 [info] Running Hello.Endpoint with Cowboy using http://localhost:8080
4/23/2017 9:29:16 PM Connecting to phoenix: [{10, 42, 69, 252}]
4/23/2017 9:29:16 PM pong
4/23/2017 9:29:16 PM Application is up!
@Faolain
Faolain / seed.ex
Created April 23, 2017 03:58 — forked from jerel/seed.ex
Run seeds in an Elixir Distillery app
defmodule :release_tasks do
def seed do
:ok = Application.load(:myapp)
[:postgrex, :ecto, :logger]
|> Enum.each(&Application.ensure_all_started/1)
Myapp.Repo.start_link