Skip to content

Instantly share code, notes, and snippets.

❯ sh ./startMac.sh
DEVICE_MODEL: iMacPro1,1
SERIAL_SET_COUNT: 1
OUTPUT_DIRECTORY: .
Cloning into 'OpenCorePkg'...
remote: Enumerating objects: 1597, done.
remote: Counting objects: 100% (1597/1597), done.
remote: Compressing objects: 100% (1430/1430), done.
remote: Total 1597 (delta 324), reused 727 (delta 112), pack-reused 0
Receiving objects: 100% (1597/1597), 14.33 MiB | 1.79 MiB/s, done.
@rparree
rparree / gist:876e50f3226f9492d252feae5d2a4a90
Last active March 28, 2021 08:53
mb docker-compose.yaml
version: "3.7"
services:
traefik:
image: "traefik:v2.1.1"
container_name: "traefik"
environment:
- TZ=Europe/Paris
command:
- "--api.insecure=true"
- "--providers.docker=true"
[info] +-org.http4s:http4s-blaze-server_2.13:0.21.13 [S]
[info] | +-org.http4s:http4s-blaze-core_2.13:0.21.13 [S]
[info] | | +-org.http4s:blaze-http_2.13:0.14.14 [S]
[info] | | | +-com.twitter:hpack:1.0.2
[info] | | | +-org.eclipse.jetty.alpn:alpn-api:1.1.3.v20160715
[info] | | | +-org.http4s:blaze-core_2.13:0.14.14 [S]
[info] | | | +-org.log4s:log4s_2.13:1.9.0 [S]
[info] | | | +-org.slf4j:slf4j-api:1.7.25 (evicted by: 1.7.30)
[info] | | | +-org.slf4j:slf4j-api:1.7.30
// Working Version :)
import React from 'react';
import {NextPageContext} from "next";
import {i18n} from '../../i18n'
import ReactMarkdown from "react-markdown";
import matter from "gray-matter";
import StandardPage from "../../components/layout/standard-page";
import {MDXProvider} from "@mdx-js/react";

You should have received the setup document. In addition to that, please prepare the steps below prior to the course. The connection in the trainng room can be slow, so this way we don't loose time.

These instructions are based on Fedora.

Install docker

Ensure dnf-plugins-core is installed (this provides commands to manage repositories)

Create a new minikube cluster

minikube -p networking start --network-plugin=cni --kubernetes-version v1.15.6 --memory=4096 

It won't start-up completely. Just do a minikube -p networking stop when it has completed.

Update the country-rest service

  • Delete your minikube 
$ minikube delete
  • Create a new cluster
$ minikube start --kubernetes-version v1.14.7 --vm-driver virtualbox \
  --cpus=2 --memory=8196 --insecure-registry=nexus-docker.local --extra-config=kubelet.authentication-token-webhook=true \
  --extra-config=scheduler.address=0.0.0.0 \
const initAnimateCSSSupport = () => {
const ACTION = Object.freeze({
START: Symbol("start"),
STOP: Symbol("stop"),
});
const updateAnimateClasses = (action) => (node) => {
const classes = node.getAttribute('data-animate').split(" ");
const fn = action === ACTION.START ? node.classList.add : node.classList.remove;
@rparree
rparree / proxy.yaml
Last active July 24, 2018 11:16
Proxy settings
- hosts: localhost
vars:
proxy_address_without_credentials: http://{{host}}:{{port_no}}
_proxy_address_with_credentials: http://{{username}}:{{password}}@{{host}}:{{port_no}}
proxy_address_with_credentials: "{{proxy_address_without_credentials if username=='' else _proxy_address_with_credentials }}"
vars_prompt:
- name: host
prompt: "proxy host"
private: no
- name: port_no
// with some inspiration from https://jsfiddle.net/uggmnho5/4/
const base = url.substr(0,url.lastIndexOf("/")) + "/";
$.get(url).then((htmlText) => {
htmlText = htmlText.replace(/src=("|\')(?!https?:|\/)/g, 'src=$1' + base) // expand to to other needs
const myDocURL = URL.createObjectURL(new Blob([htmlText], {
type: 'text/html'
}));