Create a basic GitLab CI config:
$ cat .gitlab-ci.yml
image: node
before_script:
- npm install
#!/bin/sh | |
SERVICES=$(echo "$DEPENDENCIES" | tr "|" "\n") | |
resolve() | |
{ | |
for SERVICE in $SERVICES; do | |
ip=$(nslookup "$SERVICE" | awk '/^Address: / { print $2 }') |
import 'dart:async'; | |
import 'package:meta/meta.dart'; | |
import 'package:hasura_connect/hasura_connect.dart'; | |
import 'package:http/http.dart' as http; | |
// problem: | |
// when subscribing to`HasuraConnect.subscription`, a websocket connection is created on the first subscription | |
// call. The websocket connection is created only once with the initial subscription and the provided TokenInterceptor | |
// or headers. When the token expires during an active subscription, HasuraConnect doesn't stop the subscription, or try | |
// to reconnect with the latest token in in the TokenInterceptor nor does it throw an error. It'll keep calling `onRequest` |
KEYMAPOPTS="us us" | |
HOSTNAMEOPTS="-n alpine" | |
INTERFACESOPTS="auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
hostname alpine | |
" | |
TIMEZONEOPTS="-z UTC" |
import { useState, useEffect, useRef, EffectCallback } from 'react'; | |
import throttle from 'lodash/throttle'; | |
import debounce from 'lodash/debounce'; | |
// Ties two states together, and tracks only if a specific case occur. | |
export const transitionTracker = <A, B>(from: A, to: B) => { | |
let marker = 0; | |
return (state1: A, state2: B) => { | |
if (from === state1 && to === state2) { |
version: '3.1' | |
services: | |
reverse-proxy: | |
image: traefik # The official Traefik docker image | |
command: --api --docker # Enables the web UI and tells Traefik to listen to docker | |
ports: | |
- "80:80" # The HTTP port | |
- "8080:8080" # The Web UI (enabled by --api) | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events |
This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).
Log in as root.
First, make sure the system is up to date, and install tar
and wget
:
package main | |
import( | |
"log" | |
"net/url" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |